Wix properties not being persisted from a WXI (<Control>) to a WXS (<InstallExecuteSequence>)
I hope you can help me with the following WIX issue:
In my main.wxs, I initialize "MYPROPERTY" that then in ui.wxi, I put up a dialog box with a checkbox (that is checked/enabled from the MYPROPERTY that I've setup in the .wxs). I can verify that by unchecking the checkbox, it does flip the value because I enable/disable the "Next" button depending on the MYPROPERTY value - I have more than one checkbox BTW.
The problem is that if I uncheck the checkbox in the UI when running the .msi produced, the Custom Action is ran no matter if the checkbox is checked or unchecked (as if the "MYPROPERTY" is always 1, see the condition in ). How do I make the checkbox that sets the MYPROPERTY value to actually persist to the the Custom Action?
Any help is appreciated. Thanks.
MAIN.WXS:
<Property Id='MYPROPERTY'>1</Property>
<?include ./ui.wxi开发者_运维问答 ?>
...
<InstallExecuteSequence>
<Custom Action="MyCustomAction" After="InstallFiles">
(NOT Installed) AND (MYPROPERTY = 1)
</Custom>
...
ui.wxi:
<UI Id='xxx'>
...
<Dialog
Id="Choose"
Title="My Setup">
<Control
Id="MyCheckBox"
Type="CheckBox"
CheckBoxValue="1"
Property="MYPROPERTY"
/>
...
You have defined a public property but not made it secure. If you were on Windows XP as an administrator it would work but if you were on Windows XP as a standard user perfoming an advertised / managed / elevated install or on Windows Vista with UAC enabled it would not work because you must also add the Secure attribute to the property to mark it as a SecureCustomProperty.
SecureCustomProperties Property
精彩评论