Wix CheckBox default state
windows-installer, wix
Solution
This is the way I do it and it works for me
The Property:
<Property Id="CHECKBOX" Secure="yes"></Property>
The checkbox:
<Control Id="CheckBoxId" Type="CheckBox" Text="Use the proxy server for your LAN" Property="CHECKBOX" Width="180" Height="15" X="25" Y="103" CheckBoxValue="1"/>
I believe this works because you are firstly setting the property linked to the checkbox to nothing so it stays empty and if it is clicked then the property value is equal to whatever the `CheckBoxValue` is set to. (That's my logic anyway..:)) Hope this helps
Problem
The dialog below displays a checkbox which on selected enables the Next Button. The problem is I cant get the initial state of it to be set to unchecked when the form first appears. I have tried setting the CheckBoxValue = 1 but that doesnt either work. ``` <Dialog Id="DatabaseDialog" X="50" Y="50" Width="373" Height="287" Title="[ProductName]"> <Control Id="EnableCheckBox" Property="DatabaseBackedUp" Type="CheckBox" X="20" Y="150" Width="290" Height="30" Text="Has the database been backed up?" CheckBoxValue="0" /> <Control Id="NextButton" Type="PushButton" X="300" Y="261" Width="66" Height="18" Text="{\VSI_MS_Sans_Serif13.0_0_0}&Next >" TabSkip="no" Default="yes"> <Publish Event="EndDialog" Value="Return">DatabaseDialog_NextArgs=""</Publish> <Publish Event="NewDialog" Value="[DatabaseDialog_NextArgs]">DatabaseDialog_NextArgs<>""</Publish> <Condition Action="disable"><![CDATA[DatabaseBackedUp<> "1"]]></Condition> <Condition Action="enable"><![CDATA[DatabaseBackedUp= "1"]></Condition> </Control> </Dialog> ```