title: Wix Major Upgrade, what am I doing wrong?
body: <p>Upgrades work fine if no components have changed, but any time a component changes the upgrade fails and it requires the user to manually uninstall and reinstall.</p>
  
  <p>Some snippets:</p>
  
  <pre><code>&lt;Product Id="*" Name="My Application" Language="1033" Version="!(bind.FileVersion.ClientEXE)" Manufacturer="My Company" UpgradeCode="MYGUID-b94a-44eb-8e92-9286f1d89bbd"&gt;
      &lt;Package Id="*" Description="My Installer" Comments="Copyright My Company 2008" InstallerVersion="200" Compressed="yes" /&gt;
      &lt;Upgrade Id="MYGUID-b94a-44eb-8e92-9286f1d89bbd"&gt;
        &lt;UpgradeVersion Language="1033" Property="UPGRADEFOUND" Minimum="0.0.0.0" Maximum="99.99.99.99" IncludeMinimum="yes" IncludeMaximum="yes" /&gt;
      &lt;/Upgrade&gt;
  
  
      &lt;InstallExecuteSequence&gt;
            &lt;RemoveExistingProducts Before="InstallInitialize" /&gt;
      &lt;/InstallExecuteSequence&gt;
  </code></pre>
  
  <p>Also, have some issue with the following registry key sometimes not removing on uninstall and I don't understand why:</p>
  
  <pre><code>      &lt;Component Id="InstalledRegistry" Guid="SOMEGUID-0a17-4c6b-983d-8f3feb3a7724"&gt;
          &lt;RegistryKey Id="InstalledRegKey" Root="HKMU" Key="SOFTWARE\MyCompany\Client" Action="createAndRemoveOnUninstall"&gt;
            &lt;RegistryValue Name="Version" Type="string" Value="!(bind.FileVersion.ClientEXE)" KeyPath="yes"/&gt;
          &lt;/RegistryKey&gt;
        &lt;/Component&gt;
  </code></pre>
  
  <p>That's what the bootstrapper checks to know whether to launch msiexec with "REINSTALL=ALL REINSTALLMODE=vamus" or not, so if it was uninstalled but the registry key didn't get removed setup would try to do an upgrade and fail silently.</p>
  
  <p>Let me know if any more information is needed</p>
  
  <hr>
  
  <p>Edit: There was some other issue afterwards with only some files being updated.  Changed RemoveExistingProducts to After="InstallValidate" and that resolved that.  Makes it a little slower since it fully removes the previous install instead of just upgrading files that changed (which it didn't seem to detect properly for me) but it gets the job done.</p>