[wix-users] [EXTERNAL] - Use property to save registry path

Lewis Henderson henderso at opentext.com
Thu May 9 06:45:23 PDT 2019


Hi Elena,

Just a stupid question, but is your custom action (that sets REG_KEY_PATH) run during the uninstall process as well?

				Lewis Henderson

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Elena Aralla via wix-users
Sent: Thursday, May 9, 2019 5:30 AM
To: Adnan Shaheen via wix-users <wix-users at lists.wixtoolset.org>
Cc: Elena Aralla <elena.aralla at gmail.com>
Subject: [EXTERNAL] - [wix-users] Use property to save registry path


Hi everyone,

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>
      </ Component>

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, 
Elena.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DwIGaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=yAhF6NGJ7EPmZkvswZOswwnYxaueKkO53V282tTn1P4&m=M0yamO6dcUd9P-IKsxtCKu_9NpUzdhucSRQn1G96W7E&s=aDaaQlDuXuSQv25crOZqlF5KOj9nNSUWT2KWsngAfpQ&e=


More information about the wix-users mailing list