如果选择了某个功能,我想将寄存器值设置为特定字符串 (true),如果未选择,我想将其设置为默认值 (false)。我已经尝试了以下,但我似乎没有工作:-(
<Component Id="ExampleFalseComponent">
<Condition><![CDATA[Feature1 = "3" ]]></Condition>
<RegistryValue Root="HKCU" Key="path" Name="examplevalue" Type="string" Value="false" KeyPath="yes"/>
</Component>
<Component Id="ExampleTrueComponent">
<Condition><![CDATA[Feature1 < "3" ]]></Condition>
<RegistryValue Root="HKCU" Key="path" Name="examplevalue" Type="string" Value="true" KeyPath="yes"/>
</Component>
<Feature Id="Feature1" Title="Some text string" Absent="allow" AllowAdvertise="no" InstallDefault="local" Display="collapse" Level="3">
<ComponentRef Id="ExampleFalseComponent"/>
<ComponentRef Id="ExampleTrueComponent"/>
</Feature>