Function Dependencies in the Element Selection Tree on Wix

Is there a way to force a specific function to be set if another function is selected in the function selection tree? Is it without the functions being children of their dependencies?

+5
source share
1 answer

Yes, it should be possible, if you use the Condition element in the Feature element, you can control the level of installation of the function from the condition.

<Feature Id="MyDependentFeature"> <Condition Level="1">(NOT INSTALLED AND &MyMasterFeature=3) OR (INSTALLED AND !MyMasterFeature=3)</Condition> </Feature> <Feature Id="MyMasterFeature"> </Feature> 

A few things to explain here:

  • Condition Level="1" tells Wix to set the parent installation level of the installation to 1 (Install) ( Information )
  • (NOT INSTALLED AND &MyMasterFeature=3) If the product is not already installed and the requested action MyMasterFeature is installed
  • (INSTALLED AND !MyMasterFeature=3) If the product is already installed and the installation status of MyMasterFeature is set. ( Information )
+2
source

Source: https://habr.com/ru/post/1212006/


All Articles