We use wix to create setups for our application. For the case where the user has already installed an older version of our application, we do a major upgrade by making use of Upgrade elements and RemoveExistingProducts as described here. This is all working as desired: if an older version is installed, it is upgraded transparently. If a newer version is present, the installer aborts with a clear message.
However, I now want to change the InstallScope from "perUser" to "perMachine". Unfortunately this breaks the upgrade logic. The new installer does not appear to detect and remove the previous "perUser" installation. Instead, it just installs itself on top of the older version in the same ProgramFiles location. The user gets to see two entries in the "add/remove programs" list and sees two identical shortcuts on the desktop (the old user-specific one and the new perMachine one).
How do I transition my installer from the "perUser" to the "perMachine" install scope without breaking the upgrade logic?