Wix repair installs in default path, not where the app is installed
<p>I have this property:</p>

<pre><code>&lt;Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"/&gt;
</code></pre>

<p>My directories:</p>

<pre><code>&lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
  &lt;Directory Id="LocalAppDataFolder"&gt;
    &lt;Directory Id="LocalAppDataCompany" Name="Company"&gt;
      &lt;Directory Id="INSTALLFOLDER" Name="Product" /&gt;
    &lt;/Directory&gt;
  &lt;/Directory&gt;
&lt;/Directory&gt;
</code></pre>

<p>And it compiles successfully. When I run the .msi, it installs the files in <code>C:\Users\[CurrentUser]\AppData\Local\Company\Product</code> as expected.</p>

<p>But the problem is:</p>

<ol>
<li>I run the installer and change the path (let's say in the dialog, i changed the path to <code>Product2</code></li>
<li>The product is installed in <code>...\AppData\Local\Company\Product2</code> successfully</li>
<li>I run the installer again, and chose <strong>repair</strong></li>
<li>Now I have 2 instance of product:</li>
</ol>

<p><code>C:\Users\[CurrentUser]\AppData\Local\Company\Product
C:\Users\[CurrentUser]\AppData\Local\Company\Product2</code></p>

<p>How can I fix the repair, to reinstall files (during repair) in the <code>...\AppData\Local\Company\Product2</code> (or wherever the app is installed originally)?</p>

<p>I have tried using registry search (since I am saving the value of <code>INSTALLFOLDER</code> in the registry), but it is not working.</p>