I've added a checkbox to the pre-existing WixBootstrapper theme in the options page:
<Checkbox Name="MyCheckbox" X="11" Y="217" Width="17" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes" />
In my bundle I pass the value of this checkbox through to the MSI:
<MsiPackage DisplayInternalUI="no" SourceFile="..\WixInstaller\bin\$(var.Configuration)\myinstaller.msi" Id="MainPackage">
<MsiProperty Name="INSTALLDIR" Value="[InstallFolder]" />
<MsiProperty Name="CHECKED" Value="[MyCheckbox]" />
This works fine, except I want the Checkbox to be checked by default.
I've seen solutions where you define:
<Property Id="myprop" Value="1" />
and change the Checkbox to have a Property="myprop"
attribute.
Adding any <Property>
element to the burn theme seems to break it (.exe won't run after building).
I finally found the answer here.
You set a variable in your Bundle with the same name as your checkbox:
<Bundle ...>
<Variable Name="MyCheckbox" Type="numeric" Value="1" />
I've never been so happy to see a checkbox checked!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With