Wix:如何设置功能状态;此功能将不可用";?

Wix:如何设置功能状态;此功能将不可用";?,wix,state,Wix,State,我已经分配了一个任务,其中4个子功能中的一个子功能应该显示给处于“此功能将不可用”状态的用户 例如,我有以下功能集: <Feature Id="Main" AllowAdvertise="no" ConfigurableDirectory="MYROOT" Description="Required components" Display="expand" Level="1" Title="Main Feature" Absent="disallow"> <

我已经分配了一个任务,其中4个子功能中的一个子功能应该显示给处于“此功能将不可用”状态的用户

例如,我有以下功能集:

<Feature Id="Main" AllowAdvertise="no" ConfigurableDirectory="MYROOT" Description="Required components"   Display="expand" Level="1" Title="Main Feature" Absent="disallow">
        <ComponentRef Id ="Cmp22"/>

    <Feature Id="SubFeature_1" AllowAdvertise="no" Level="1"> 

    </Feature>
    <Feature Id="SubFeature_2" AllowAdvertise="no" Level="1"> 

    </Feature>
    <Feature Id="SubFeature_3" AllowAdvertise="no" Level="1"> 
            <!-- I want this feature to displayed as "This Feature Will Not be available" -->
    </Feature>

</Feature>

我尝试了不同的级别

另外,我使用了一个VbScript自定义操作,使用Session.FeatureRequestState方法在运行时对其进行更改,但无法获得足够的结果

有人能告诉我这件事吗


感谢并致以最诚挚的问候

将级别设置为高于INSTALLLEVEL属性值的值:


例如,如果INSTALLLEVEL为3,则功能级别应为4。要确定INSTALLLEVEL值,您可以查看MSI中的属性表。

Cosmin,非常感谢您提供的一些信息性回复。我已将msi打开到Orca以查看其属性表,但其中没有INSTALLLEVEL。根据MSDN:“如果未指定值,安装级别默认为1。”我在运行时使用vbscript自定义操作实现了这一点:)。