title: Wix How do Directories work?
body: <p>I'm trying to build a WIX installer, which allows the user to specify the install path through command line arguments.</p>
  
  <pre><code>&lt;Property Id="IISROOTPATH"&gt;
     &lt;RegistrySearch Id="FindInetPubFolder" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp" Name="PathWWWRoot" Type="directory" /&gt;
  &lt;/Property&gt;    
  ...
  &lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
     &lt;Directory Id="IISROOTPATH"&gt;
        &lt;Directory Id="INSTALLPATH" Name="WebsiteFolder"&gt;
  ...
  </code></pre>
  
  <p>If the user doesn't pass in any arguments, it will look up registry for the iisroot folder, and install the files under a folder called "WebsiteFolder"</p>
  
  <p>But in order for the user to change the install path, they must pass in an absolute path eg</p>
  
  <pre><code>INSTALLPATH="C:\InetPub\wwwroot\CustomWebsiteFolder"
  </code></pre>
  
  <ol>
  <li><p>How does this work? does it then ignore the other Directory elements TARGETDIR and IISROOTPATH?</p></li>
  <li><p>How can I change INSTALLPATH to just WEBSITEFOLDERNAME so the user is only required to pass in the folder name rather than the absolute install path.  Thus forcing the user to always install into inetpub?</p></li>
  </ol>