tags:

views:

29

answers:

1

Hello,

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"
    />
...
A: 

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

Christopher Painter
The installer already elevates permissions to even run so that's not the issue. Even so, I put in the 'Secure' attribute in the Properties element and didn't make a difference
Well, that's the common reason for that scenario. My next comment would be: Have you logged the install and read it? BTW, MYPROPERTY=1 is redundant. You can just say MYPROPERTY
Christopher Painter