[wix-users] Use property to save registry path
rob at firegiant.com
Thu May 9 06:54:46 PDT 2019
Short replies here. Complete answers over there: http://www.firegiant.com/
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Elena Aralla via wix-users
Sent: Thursday, May 9, 2019 2:30 AM
To: Adnan Shaheen via wix-users <wix-users at lists.wixtoolset.org>
Cc: Elena Aralla <elena.aralla at gmail.com>
Subject: [wix-users] Use property to save registry path
I’ve some problem with Property!
I defined a variable in the Product.wxs file in this way:
<Property Id="REG_KEY_PATH" Value="empty” Secure=“yes” />
The value of the variable is modified by an immediate custom action (as seen in the setup logs):
MSI (c) (10! 88) [10: 40: 26: 693]: PROPERTY CHANGE: Modifying REG_KEY_PATH property. Its current value is 'empty'. Its new value: 'SOFTWARE\ManufacturerTest\ProductTest\Default'.
I've used this variable to write registry key in this way:
<Component Id = "_ 89F85C42_0066_4D90_970C_22D7E308554A" Guid = "7925E183-E7F6-4DB6-9822-FC41468F7E05" Transitive = "no" Directory = "TARGETDIR">
<RegistryKey Root = "HKLM" Key = "[REG_KEY_PATH]" ForceCreateOnInstall = "no" ForceDeleteOnUninstall = "yes" />
<Condition> <! [CDATA [Not Installed]]> </Condition>
When I do the install, it seems all right; the registers are written in the correct way; but when I uninstall, something doesn't work (machine crashes)
If I look in the uninstall logs, the variable still has the initial ‘empty' value, not the value set in the custom action.
Property(S): REG_KEY_PATH = empty
Why uninstall doesn’t read the new value?
How can I define different registry set depending on user choice in the same Product.wxs file?
Thanks a lot,
More information about the wix-users