选中另一个复选框时选中复选框

Check checkbox when another checkbox is checked

这是我的 WIX:

<Control Id="FeatureOneBox" Type="CheckBox" Property="FEATUREONE" Text="Feature One" X="30" Y="87" Height="10" Width="200" CheckBoxValue="1" />
<Control Id="FeatureTwoBox" Type="CheckBox" Property="FEATURETWO" Text="Feature Two" X="30" Y="107" Height="10" Width="200" CheckBoxValue="1" />
<Control Id="FeatureThreeBox" Type="CheckBox" Property="FEATURETHREE" Text="Feature Three" X="30" Y="107" Height="10" Width="200" CheckBoxValue="1" />
<Control Id="CoreFeatureBox" Type="CheckBox" Property="INSTALLCORE" Text="!(loc.CoreFeatureBox)" X="30" Y="147" Height="10" Width="300" CheckBoxValue="1">
    <Condition Action="enable"><![CDATA[FEATURETWO <> 1 AND FEATURETHREE <> 1]]></Condition>
    <Condition Action="disable">FEATURETWO = 1 OR FEATURETHREE = 1</Condition>
</Control>

如果选择了功能二或三,我想要求核心功能。我可以通过更改功能条件来做到这一点,但是,如果用户取消选中这两个,取消选中核心,然后重新选中其中之一,我不想安装核心功能,即使它的复选框未选中。

如何在禁用它的同时检查CoreFeatureBox

要是我再用谷歌搜索几分钟就好了!

This code 就是我所需要的:

<Control 
   Id="CB1" 
   Type="CheckBox" 
   Property="myCheckboxResult" 
   CheckBoxValue="my value" 
   Text="Check the box please." 
   X="50" 
   Y="50" 
   Height="10" 
   Width="150">

   <Publish Property="myCheckboxResult2" Value="my value" Order="1">myCheckboxResult</Publish>
   <Publish Property="myCheckboxResult2" Value="{}" Order="2">NOT myCheckboxResult</Publish>
   </Control>

<Control 
   Property="myCheckboxResult2" 
   Id="CB2" 
   Type="CheckBox" 
   CheckBoxValue="my value" 
   Text="Check the box please." 
   X="50" 
   Y="70" 
   Height="10" 
   Width="150" />

我在 FeatureTwoBoxFeatureThreeBox 下添加了 <Publish/> 节点,一切正常。