Wix 如何将功能状态写入注册表项

Wix 如何将功能状态写入注册表项,wix,wix3.5,wix3.6,Wix,Wix3.5,Wix3.6,如果在安装过程中安装了某项功能,那么将其写入注册表项的最佳方式是什么?您应该使用已指定条件的组件。条件可能参考特征状态(当前或请求-有关更多详细信息,请参阅)。我使用“&”符号-它得到请求(应该通过安装实现)功能状态 <Component Id="MyComponentSpecificReg" Guid="YOURGUID"> <Condition>&MyFeatureId = 3</Condition> <!--install this

如果在安装过程中安装了某项功能,那么将其写入注册表项的最佳方式是什么?

您应该使用已指定条件的组件。条件可能参考特征状态(当前或请求-有关更多详细信息,请参阅)。我使用“&”符号-它得到请求(应该通过安装实现)功能状态

<Component Id="MyComponentSpecificReg" Guid="YOURGUID">
    <Condition>&MyFeatureId = 3</Condition> <!--install this component only of feature requested state is LOCAL (You may need other condition - please read the link I posted above)-->
    <RegistryKey Root="YOUR REG ROOT" Key="YOUR REGISTRY PATH" Action="create">
        <RegistryValue Name="YourKeyName" Type="string" Value="[YOUR_PROPERTY]"/>
    </RegistryKey>
</Component>

&MyFeatureId=3