Search code examples
checkboxwixcustom-action

WiX. Run a custom action when a checkbox is checked


I have two files Product.wxc there i wrote

<Property Id="CheckBoxProp">

and Custom Action

<InstallExecuteSequence>
      <Custom Action="MyCustomAction" After="InstallInitialize">
        CheckBoxProp=1 
      </Custom>
</InstallExecuteSequence>

In another file MyCheckBoxDlg.wxc I wrote UI dialog there I described checkbox

<Control Type="CheckBox" Id="MyCheckBoxID" Width="125" Height="26" X="26" Y="124" Text="My text" Property="CheckBoxProp" CheckBoxValue="1" />

All publishs I wrote in another file where I have a DialogRef to MyCheckBoxDlg

When I start my installation customaction doesn't see change of value CheckBoxProp.

Help plz! I wait for your help.


Solution

  • CheckBoxProp is a private not a secure (public) property. Change it to CHECKBOXPROP and use the Secure attribute to get it listed in the SecureCustomProperties property.