wix save feature state to property or get feature state in custom action

655 Views Asked by At

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?

2

There are 2 best solutions below

0
On BEST ANSWER

The state operators aren't formattable, so yes, you're expected to get state using the MSI API (or wrappers like FeatureInfo in DTF).

0
On

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.