Wix: How to set a Feature State "This Feature Will Not be available"?
I've assigned a task in which one sub feature among 4 should be displayed to the user in the state as "This Feature Will Not be available"
For instance, I have this feature set:
<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>
I've tried with different Level values.
Al开发者_如何学编程so, I used a VbScript custom action using Session.FeatureRequestState method, to change it at runtime, but can't get enough results.
Can someone please guide me about this?
Thanks and Best regards
Set the level to a value higher than INSTALLLEVEL property value: http://msdn.microsoft.com/en-us/library/aa369536(VS.85).aspx
For example, if INSTALLLEVEL is 3, your feature level should be 4. To determine the INSTALLLEVEL value you can check the Property table in your MSI.
精彩评论