wix - right condition
I have 3 features in my wix-project. When the user choose feature1 or feature2 I need to install the copmonent1. And in case the user choose the feature3 i need to install component2. I realized this with code likes following:
<Component Id="component1" GUID="">
<Condition><![CDATA[(&feature1=3) Or (&feature2=3)]]></Condition>
<RegistryKey Action="createAndRemoveOnUninstall" ...
...
</Component>
<Component Id="component2" GUID="">
<Condition><![CDATA[(&feature3=3)]]></Condition>
<RegistryKey Action="createAndRemoveOnUninstall" ...
...
</Component>
I can't just make two references to component1 from features 1 and 2. Because when user will choose the features 1 and 3 i need to install just second component and not to install the first.
I can't understand, is my condition string wrong? Because after installing the product there is no any registry entry from chosen component. Best regard开发者_开发知识库s..
Feature states in component conditions won't work. See http://www.joyofsetup.com/2008/04/09/feature-states-in-component-conditions/ for details.
This is usually done through FeatureComponents table:
- component1 can be added in Feature1 and Feature2
- component2 can be added in Feature3
I didn't find information about how Wix handles this table, so I'm not sure if you have direct support for it.
精彩评论