0
votes

I released a Windows installer (V1) built with WiX 3.5. V1 has an UpgradeCode, but no Upgrade or MajorUpgrade elements. V2 is not released yet.

I can add the MajorUpgrade element to both a V2 and V3 installer, and the downgrade from V3 to V2 can be detected and prevented. I understand during the installation of V2 I can also detect V1.

The problem:
Currently I can install V1 over V2 in the same directory, and both versions appear in Add / Remove Programs. The V1 files overwrite the V2 files. Uninstalling V1 does not remove V2 from Add / Remove Programs, but does delete the V2 files, as they have the same pathnames as V1. The user is left with an unusable V2 installation.

Is it possible to prevent V1 from installing after I've installed V2?
OR
Is it possible for V1 to correctly uninstall V2?

  • V2 successfully uninstalls V1 automatically
  • Only one ARP entry is present after the V2 upgrade installation, with V2's version number
  • V1 and V2 have the same UpgradeCode
  • V2 has a version number which is greater than V1 in the first three fields
  • V1 and V2 have a matching InstallScope
1

1 Answers

1
votes

Prevention of a downgrade requires the upgrade detection logic to work, and it looks like it isn't because you get two ARP entries. V1 and V2 need the same UpgradeCode, V2 must have a version that is greater than V1 in the first three fields, and the InstallScope must match. If V2 was installer per user (or per machine) then V1 will also install and not upgrade if it's not the same scope.