Wix:如何设置功能状态“此功能将无法使用”?

时间:2010-12-16 09:53:42

标签: wix state

我已经分配了一个任务,其中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>

我尝试过不同的级别值。

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

有人可以指导我这个吗?

谢谢,敬请期待

1 个答案:

答案 0 :(得分:1)

将级别设置为高于INSTALLLEVEL属性值的值: http://msdn.microsoft.com/en-us/library/aa369536(VS.85).aspx

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

相关问题