How to set the default checkbox in Wix

I use the checkbox "Check box and Skip dialog box based on this flag".

Checkbox code below

<Control Id="CheckBox_Samples" Type="CheckBox" X="172" Y="225" Width="274" Height="26" Property="INSTALLSAMPLES" Text="Install Samples" CheckBoxValue="TRUE" TabSkip="no" />

In the code below, skip the dialog box.

<Control Id="Next" Type="PushButton" X="372" Y="348" Width="56" Height="17" Text="[ButtonText_Next]" Default="yes">
  <Publish Event="SetTargetPath" Value="APPDIR">INSTALL</Publish>
  <Publish Event="NewDialog" Value="NewDialog_1">INSTALL AND INSTALLSAMPLES</Publish>
  <Publish Event="NewDialog" Value="SetupTypeDlg">INSTALL AND (NOT INSTALLSAMPLES)</Publish>
</Control>

Everything is working fine. But the checkbox is always not selected by default. I want to show the "Default" checkbox.

+5
source share
1 answer

The controls are attached to properties, so if you set property values, they will be displayed as content / default setting. Have you tried setting the property INSTALLSAMPLESto TRUEbefore showing your checkbox?

+6
source

All Articles