title: How can I disable a Wix component when a Feature is selected?
body: <p>It's easy in Wix to enable a component when a feature is selected. I want to do the opposite of that, where the component will be installed unless a given feature is selected. The reason is that the component performs a configuration change that is not required if the given feature is chosen.</p>
  
  <p><strong>Failed Experiments:</strong></p>
  
  <p>I've tried using conditions in the component:</p>
  
  <pre><code>&lt;Component ...&gt;
      &lt;Condition&gt;&amp;Feature = 3&lt;/Condition&gt;
      ...
  &lt;/Component&gt;
  </code></pre>
  
  <p>That doesn't work, because <a href="http://www.joyofsetup.com/2008/04/09/feature-states-in-component-conditions/" rel="nofollow">apparently the feature states are not calculated at the point where the component conditions are evaluated</a>.</p>
  
  <p>I've also tried using a custom action set to run before CostFinalize in order to set a property that can be tested in the Component condition. This also didn't work:</p>
  
  <pre><code>&lt;Custom Action="Transfer_Feature_State" Before="CostFinalize" /&gt;
  &lt;Custom Action="Transfer_Feature_State_Property" Before="MtpWeb_Features_LabManager" /&gt;
  &lt;Custom Action="Transfer_Feature_State_Feature" Before="MtpWeb_Features_LabManager" /&gt;
  </code></pre>
  
  <p>When the custom action ran, the feature state was still set as -1, so the feature states have not been calculated before CostFinalize.</p>
  
  <p>Is there any way to disable a component based on feature selection?</p>