title: %programfiles% is not expanding in wix registry search
body: <p>I am using wix registry search in order to locate a plugin directory for a program I am trying to integrate with. The value of the registry key looks like this:</p>
  
  <pre><code>%PROGRAMFILES%\Product\Plugins
  </code></pre>
  
  <p>When I do a registry search with type="raw" like this:</p>
  
  <pre><code>&lt;Property Id="PLUGINDIR_STRING"&gt;
    &lt;RegistrySearch Id="PluginDirSearchString"
                    Root="HKLM"
                    Key="$(var.PluginDirRegKey)"
                    Name="$(var.PluginDirRegKeyName)"
                    Type="raw"
                    Win64="yes" /&gt;
  &lt;/Property&gt;
  </code></pre>
  
  <p>I will get the exact string.</p>
  
  <p>When I use type Directory like this:</p>
  
  <pre><code>&lt;Property Id="PLUGINDIR"&gt;
    &lt;RegistrySearch Id="PluginDirSearch"
                    Root="HKLM"
                    Key="$(var.PluginDirRegKey)"
                    Name="$(var.PluginDirRegKeyName)"
                    Type="directory"
                    Win64="yes" /&gt;
  &lt;/Property&gt;
  </code></pre>
  
  <p>I will get an empty string. I am checking the values like this:</p>
  
  <pre><code>&lt;Condition Message='plugin dir "[PLUGINDIR_STRING]" found using registry key "$(var.PluginDirRegKey)" is not a valid path, make sure the path exist'&gt;PLUGINDIR_STRING AND NOT PLUGINDIR&lt;/Condition&gt;
  
  &lt;Condition Message='Unable to find registry key "$(var.PluginDirRegKey)", make sure $(var.PRODUCT) is installed'&gt;PLUGINDIR_STRING&lt;/Condition&gt;
  </code></pre>
  
  <p>The first message is displayed indicating that PLUGINDIR_STRING is found, but not PLUGINDIR. I thought the Directory option should expand %programfiles%? How to correctly handle a registry value like  this?</p>
  
  <pre><code>%PROGRAMFILES%\Product\Plugins
  </code></pre>