3

Add one checkbox in the HyperlinkTheme.xml like

<Checkbox Name="MyCheckBox" X="18" Y="191" Width="-11" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">Install Driver</Checkbox> 

How can i use this in bootstrapper? I have modified the Bundle.wxs file like,

<MsiPackage SourceFile="..\..\..\..\install\MyMSI.msi" InstallCondition="MyCheckBox" ForcePerMachine="yes" Vital="yes" Visible="yes" />  

But this doesn't work properly. It didn't install the MyMSI.msi but the check box value is "selected". did I miss anything. Please help. Thanks in advance.

Nimish
  • 709
  • 3
  • 16
Harikrishna R
  • 317
  • 1
  • 4
  • 11

2 Answers2

1

Is your checkbox in the Options page in HyperlinkTheme.xml?

According to this answer from WiX developer Bob Arnson, all checkboxes except for the ones added to the Options page are simply ignored.

HyperlinkTheme.xml:

<Page Name="Options">
    <Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Text>
    <Text X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Text>
    <Editbox Name="FolderEditbox" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
    <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.OptionsBrowseButton)</Button>
    <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsOkButton)</Button>
    <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsCancelButton)</Button>

    <!-- Additional checkbox control -->
    <Checkbox Name="MyCheckBox" X="-11" Y="-173" Width="260" Height="17" TabStop="yes" FontId="3">#(loc.MyCheckbox)</Checkbox>
</Page>

If you did add it to the Options page, there might be a problem with the way to used the condition in the bundle.wxs file. Try the method used in the question linked above and see how that works:

<Variable Name="MyVariable" Type="numeric" Value="![CDATA[MyCheckBox]]"/>
Community
  • 1
  • 1
Valdimar
  • 364
  • 5
  • 18
1

In your <MsiPackage element, state InstallCondition="MyCheckBox=1"

JM Lauer
  • 192
  • 1
  • 11