[wix-users] Preserve registry values on Major Upgrade

David Watson dwatson at sdl.com
Mon Jul 2 09:00:49 PDT 2018


http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/


www.sdl.com
SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us.
​SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. 
Registered address: SDL PLC, New Globe House, Vanwall Business Park, Vanwall Road, Maidenhead, SL6 4UB, U.K.
-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Hoover, Jacob via wix-users
Sent: 02 July 2018 16:33
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Hoover, Jacob <Jacob.Hoover at greenheck.com>
Subject: Re: [wix-users] Preserve registry values on Major Upgrade

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] 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>
Cc: Luca Bacci <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