mardi 22 août 2017

WiX Burn Theme checkbox - making it checked by default

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 element to the burn theme seems to break it (.exe won't run after building).




Aucun commentaire:

Enregistrer un commentaire