<p>This might be a naive question. I have to manually edit a .WXS file to make it support select features from command line.</p>

<p>For example, there are 3 features in .WXS file.</p>

<pre><code>&lt;Feature Id="AllFeature" Level='1'&gt;

    &lt;Feature Id="Feature1" Level='1'&gt; &lt;/Feature&gt;

    &lt;Feature Id="Feature2" Level='1'&gt; &lt;/Feature&gt;

    &lt;Feature Id="Feature3" Level='1'&gt; &lt;/Feature&gt;

&lt;/Feature&gt;
</code></pre>

<p>Now, I want to select features from command line. Say, if I type "msiexec /i install.msi FEATURE=A", then "Feature1" and "Feature2" is installed; if I type "msiexec/i install.msi FEATURE=B", then "Feature1" and "Feature3" is installed. In this case, "A" maps to Feature 1 and 2; "B" maps to Feature 1 and 3.</p>

<p>How to accomplish this in WIX?</p>

I would change Feature1, Feature2 and Feature3 to Components, then would declare something like this:
```
```
<Feature Id="FEATUREA" Title="Super" Level="1" >
  <ComponentRef Id="Component1" />
  <ComponentRef Id="Component2" />
</Feature>

<Feature Id="FEATUREB" Title="Super1" Level="1" >
  <ComponentRef Id="Component1" />
  <ComponentRef Id="Component3"/>
</Feature>
```
```
Then to Install either FeatureA or FeatureB
```
```
msiexec /i install.msi ADDLOCAL=[FEATUREA | FEATUREB]
```
```