title: Reference directory install path in registry value using Wix
body: <p>I want to save the path of my application, installed with wix, in the windows registry. I tried the following:</p>
  
  <pre><code>&lt;RegistryValue Root="HKLM" Key="Software\company\InstallLocation" Value="[#INSTALLLOCATION]" Type="string" Action="write" /&gt;
  </code></pre>
  
  <p>where <code>INSTALLLOCATION</code> is the Directory Id of the folder in Wix, but this doesn't work. It seems that the [#id] syntax is only for files...</p>
  
  <p>I saw the following question but the blog he references seemingly is no more:</p>
  
  <p><a href="https://stackoverflow.com/questions/521825/saving-install-path-to-registry">https://stackoverflow.com/questions/521825/saving-install-path-to-registry</a></p>