wix save feature state to property or get feature state in custom action
Can i save feature state and action into property value? Like <Property id="prop" Value=开发者_如何学运维[!MyFeature]" />
If it's not possible, how i can get feauture state in custom action? Only using MsiGetFeautureState from msi.dll?
The state operators aren't formattable, so yes, you're expected to get state using the MSI API (or wrappers like FeatureInfo in DTF).
You can try using a custom action which sets a custom property to formatted text, for example to "1". This custom action can then be conditioned with the feature state.
This way the property is set only if the feature state is the one you want and you don't need to use custom code.
精彩评论