0
votes

We want to rollout a new major release (V2.0) of a .net application on windows via WIX.

This rollout will be a per-machine installation. Updates will be major updates (e.g. V2.1,...). This mechanism works as expected. When the product is updated it is replaced by the new version in the registry. However it doesn't replace previous version (below V2.0).

Previous versions of this product (V1.0,V1.1,V1.5) were also installed with WIX, but in a different way. These were per-user installations. The product installers had a defined ProductCode. Major upgrade installers had set, so the product code changed for each upgrade installer. Every new upgrade resulted in a new registry entry. So after upgrading we had a version 1.0, 1.1, 1.2 in the registry (and the "Remove programs"-dialog)

With version 2.0 however I want to clean up everything. All Version 1 installation should be removed. The only thing that is common for all installers is the upgrade code. Unfortunately, versions v1.x stay untouched when running my V2.x installer.

Is there a way to achieve this with Wix natively or a custom action?

2

2 Answers

0
votes

Per: Major Upgrades

Note If an application is installed in the per-user installation context, any major upgrade to the application must also be performed using the per-user context. If an application is installed in the per-machine installation context, any major upgrade to the application must also be performed using the per-machine context. The Windows Installer will not install major upgrades across installation context.

There are ways to address this with bootstrapper cleanup utilities but even that may not work because the per-user installation might have been done using a different user account and would be out of scope.

0
votes

It should just work if your UpgradeCode is the same assuming:

  1. You have incremented the ProductVersion in the first 3 digits.
  2. Your new product has actions FindRelatedProduct, RemoveExistingProducts. In other words the WiX upgrade stuff or a MajorUpgrade element.
  3. Both installs are in the same context (per user over per user or per machine over per machine).

I can't tell from the earlier posts if these are happening or not.