title: Set a property in WiX based on a condition
body: <p>This <em>should</em> be easy, but after several hours I’m coming up blank. ;(</p>
  
  <p>I do a registry search (actually two), because I need to check for <em>either</em> of two previous installs and then install my new files to the location of the prior install that was found.</p>
  
  <ul>
  <li>Only <b>one</b> of these prior installs will actually exist.</li>
  </ul>
  
  <p>I then need to install my new files to the 'InstallLocation' of which 'PROD#' was found.</p>
  
  <pre><code>&lt;!—  Look for the UnInstall key of the 1st possible product  --&gt;
  &lt;!—  GUID = {E928E024-DEFE-41A7-8469-D338212C4943}           --&gt;
  &lt;Property Id='PROD1'&gt;
      &lt;RegistrySearch Id='PROD_REG1'
                      Type='raw'
                      Root='HKLM'
                      Key='$(var.REGKEY_PROD1)'
                      Name='InstallLocation' /&gt;
  &lt;/Property&gt;
  
  &lt;!—  Look for the UnInstall key of the 2nd possible product  --&gt;
  &lt;!—  GUID = {A40A9018-DB9D-4588-A591-F012600C6300}           --&gt;
  &lt;Property Id='PROD2'&gt;
    &lt;RegistrySearch Id='PROD_REG2'
                    Type='raw'
                    Root='HKLM'
                    Key='$(var.REGKEY_PROD2)'
                    Name='InstallLocation' /&gt;
      &lt;/Property&gt;
  
  &lt;!--  How do I set INSTALL_HERE Property to whichever ‘InstallLocation’ was found?  --&gt;
  
  &lt;!--  Define the directory structure  --&gt;
  &lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
      &lt;Directory Id="INSTALL_HERE"&gt;
          &lt;Directory Id="MAIN_DIRECTORY" Name="MyProduct"/&gt;
          &lt;Directory Id="HELP_DIRECTORY" Name="Help"/&gt;
      &lt;/Directory&gt;
  &lt;/Directory&gt;
  </code></pre>