title: WIX - Getting source files from an environment variable path
body: <p>I'am new to WIX, trying to create an msi with feature tree.</p>
  
  <ol>
  <li>The installer should install all the assemblies in folder <code>C:\ProgramFile\MyDir\MyApp</code>.</li>
  <li><p>Reading path from an environment variable called <code>MyFolder</code>.</p>
  
  <pre><code>&lt;WixVariable Id ="MyFolder" Value="[%MyFolder]"/&gt;
  </code></pre></li>
  <li><p>Below is the code from where the assemblies are read.</p>
  
  <pre><code>&lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
  &lt;Directory Id="ProgramFilesFolder" Name="ProgramFilesFolder"&gt;
  &lt;Directory Id="ProgramFilesFolder.MyDIR" Name="MyDIR"&gt;
  &lt;Directory Id="PROGRAMFILESFOLDER.MyDIR.MyApp" Name="MyApp"&gt;
  
  &lt;Component Id="Component.aaa.dll" Guid="guid1"&gt;
    &lt;File Id="aaa.dll" Source="..\..\OutPut\aaa.dll" /&gt;
  &lt;/Component&gt;
  </code></pre></li>
  <li><p>Now I would like to get the assemblies from the folder <code>MyFolder</code> which is an environment variable and append it to my Source  </p>
  
  <pre><code>&lt;Directory Id="MyFolder" Name="MyFolder" SourceName="MyFolder"&gt;
    &lt;Component Id="Component.bbb.exe" Guid="guid2"&gt;
      &lt;File Id="bbb.exe" Name="bbb.exe" Vital="yes" Source=MyFolder + bbb.exe /&gt;
    &lt;/Component&gt;
  &lt;/Directory&gt;
  </code></pre></li>
  </ol>
  
  <p>I receive a compilation error saying it is unable to find bbb.exe.</p>
  
  <p>Please let me know on where I'm going wrong.</p>