title: Custom Action for Feature in WIX
body: <p>I am trying to execute an EXE file through my installation and this file should be installed if the related feature will be installed in the feature tree. 
  I have two questions :</p>
  
  <p>1-How to relate the Custom Action to this feature."The condition"</p>
  
  <p>2- How I can include this exe file in the generated file. "This EXE File is a SQL Installation which I already made in WIX BOOTSTRAPPER " </p>
  
  <p><a href="http://apprize.info/web/wix/13.html" rel="nofollow noreferrer">http://apprize.info/web/wix/13.html</a></p>
  
  <p>and my code is  </p>
  
  <pre><code>&lt;Feature Id="SubFeature1" Title="SQL Installation" Level="1" &gt;
      &lt;ComponentRef Id="SubComponent1"/&gt;
    &lt;/Feature&gt;
    &lt;Feature Id="SubFeature2" Title="Second Subfeature" Level="1" &gt;
      &lt;ComponentRef Id="SubComponent2"/&gt;
      &lt;!-- &lt;Condition Level="0"&gt;IISMAJORVERSION=""&lt;/Condition&gt;    --&gt;
    &lt;/Feature&gt;
  &lt;/Feature&gt;
  
  
  &lt;CustomAction Id="CreateSQLINSTALLER" Directory="BMSS4_Installer"
  Execute= "deferred" Impersonate="no" Return="ignore"
  ExeCommand="[BMSS4_Installer]Sql_Installation_Test1.exe -install" /&gt;
  
  &lt;InstallExecuteSequence&gt;
  
    &lt;Custom Action="CreateSQLINSTALLER"  Before="InstallFinalize"&gt;&lt;![CDATA[(&amp;SubFeature1)]]&gt;&lt;/Custom&gt;
  
  &lt;/InstallExecuteSequence&gt;
  </code></pre>
  
  <p>the Sql_Installation_Test1.exe is included in the main folder so BMSS4_Installer..
  But is it right to use it direclty like that in Directory tag om CustomAction !!</p>