title: WIX Toolset MSI. How to read folder name from registry?
body: <p>This code gives me the value of the PowerShellVersion key.</p>
  <pre><code> &lt;Property Id=&quot;POWERSHELLVERSION&quot;&gt;
        &lt;RegistrySearch Id=&quot;POWERSHELLVERSION&quot;
                        Type=&quot;raw&quot;
                        Root=&quot;HKLM&quot;
                        Key=&quot;SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine&quot;
                        Name=&quot;PowerShellVersion&quot;/&gt;
   &lt;/Property&gt;
  </code></pre>
  <p>How can I get the name of the folder?
  For example, I need to find the name of the PowerShellEngine folder in folder 3 and assign it to Property &quot;POWERSHELLVERSION&quot;.</p>
  <pre><code> &lt;Property Id=&quot;POWERSHELLVERSION&quot;&gt;
        &lt;RegistrySearch Id=&quot;POWERSHELLVERSION&quot;
                        Type=&quot;raw&quot;
                        Root=&quot;HKLM&quot;
                        Key=&quot;SOFTWARE\Microsoft\PowerShell\3&quot;
                        Name=&quot;PowerShellEngine&quot;/&gt;
   &lt;/Property&gt;
  </code></pre>