[wix-users] Preserve registry values on Major Upgrade

Edwin Castro egcastr at gmail.com
Mon Jul 2 09:57:32 PDT 2018


I second the approach to having application controlled defaults in one
location and user overrides in a second location. That will allow you to
update the application controlled defaults as necessary during upgrade and
make it the user's responsibility to maintain user overrides. That is a
really nice separation of concerns and responsibilities with this approach.

--
Edwin G. Castro


On Mon, Jul 2, 2018 at 9:53 AM, Hoover, Jacob via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> Seems viable, it all depends on the desired behavior.  Personally, if it’s
> a per machine install I would have the installer write and maintain logical
> defaults in HKLM, and have the app create (and be able to reset) HKCU based
> on the HKLM values.  Even if it’s a per-user install, one could have some
> defaults in one location, and the user customized values in another.
>
> From: Luca Bacci [mailto:luca.bacci982 at gmail.com]
> Sent: Monday, July 2, 2018 11:00 AM
> To: Hoover, Jacob <Jacob.Hoover at greenheck.com>
> Cc: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] Preserve registry values on Major Upgrade
>
> Thank you very much!
>
> Aside from the property solution, what do you think of the method
> described here on Stack Overflow? https://stackoverflow.com/a/25363029
>
> 2018-07-02 17:32 GMT+02:00 Hoover, Jacob <Jacob.Hoover at greenheck.com<
> mailto:Jacob.Hoover at greenheck.com>>:
> Property drive the values, and use RegistrySearch's to give them the user
> customized values or a logical default.
>
> Another option, if this is a per machine install, would be to directly
> control the defaults in HKLM, and have the app be aware of the default
> location but have the HKCU be written and controlled by the app.
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org<mailto:wi
> x-users-bounces at lists.wixtoolset.org>] On Behalf Of Luca Bacci via
> wix-users
> Sent: Monday, July 2, 2018 10:17 AM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org<mailto:
> wix-users at lists.wixtoolset.org>>
> Cc: Luca Bacci <luca.bacci982 at gmail.com<mailto:luca.bacci982 at gmail.com>>
> Subject: [wix-users] Preserve registry values on Major Upgrade
>
> Hello, I have many registry values that I create on install and are values
> for user preferences / customization. In my wix project I have a component
> with many registryvalue elements
>
> <Component Id="cmpRegSettings" Directory="TARGETDIR" Guid="*">
>   <RegistryKey Key="Software\My\App\Settings" Root="HKCU">
>     <RegistryValue Name="A" Value="120" Type="integer" />
>     <RegistryValue Name="B" Value="80" Type="integer" />
>     ...
>   </RegistryKey>
> </Component>
>
> Their value are set to the default when installing for the first time. I'm
> now implementing major upgrade and I need to leave existing preferences as
> set by the user. What's the best way to do it?
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list