Is there any way to force a particular feature to be installed if another feature is selected in the feature selection tree? That is without having the features be children of their dependencies?
Yes this should be possible, if you use the Condition element under a Feature element, you can control the feature install level from a condition.
<Feature Id="MyDependentFeature">
<Condition Level="1">(NOT INSTALLED AND &MyMasterFeature=3) OR (INSTALLED AND !MyMasterFeature=3)</Condition>
</Feature>
<Feature Id="MyMasterFeature">
</Feature>
A couple things to explain here:
Condition Level="1"
tells Wix to set the parent Feature install level to 1 (Install) (Info)(NOT INSTALLED AND &MyMasterFeature=3)
If the product is not already installed, and the requested action of MyMasterFeature is Install(INSTALLED AND !MyMasterFeature=3)
If the product is already installed, and the install state of MyMasterFeature is Installed. (Info)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With