1

The version 1 of our WiX custom bootstrapper does not have any uninstallation logic for upgrade operation. This installer has been rolled out already. Now in version 2 I want to support upgrade, but in order to uninstall the v1 package I have to put some logic in my BA. I'm thinking of packaging a modified v1 bundle (with uninstallation logic in place), and then I will use this to overwrite the old bundle in C:\ProgramData\Package Cache so that when my v2 upgrade executes, it will call the modified v1 bundle and uninstall the old package. Now the installation of v2 succeeds, but the uninstallation of v1 fails.

My log file has the following info:

Detected related bundle: {297fb3b4-f677-4d92-a81a-c0448587b072}, type: Upgrade, scope: PerMachine, version: 1.1.0.0, operation: None
Detected related bundle: {90a15f11-66af-4682-8b09-7f3600f5bacf}, type: Upgrade, scope: PerMachine, version: 1.2.0.0, operation: None
Plan begin, 7 packages, action: Uninstall
Plan skipped removal of provider key: {78089b86-4712-4498-b4f6-7a4544d721b8} because it is registered to a different bundle: (null)
Plan skipped related bundle: {90a15f11-66af-4682-8b09-7f3600f5bacf}, type: Upgrade, because it was previously scheduled.

I have no issues upgrading from v2 to v3, because my v2 already has the uninstall logic.

mark uy
  • 521
  • 1
  • 6
  • 17

1 Answers1

0

The UpgradeCode should have been set in your V1 install. I would utilize that to implement "Upgrade logic."

If for some reason that's not possible, you can always uninstall using the ProductCode in your V1 install. msiexec /x {}

Doc
  • 698
  • 3
  • 16
  • The UpgradeCode of my V1 is same as my V2. But since I don't have any handling in the V1 version during launching, whenever my V2 does the upgrade and calls the old package, it opens a new instance of my bootstrapper UI, so I get two instances open. Now I'm trying to patch this problem by "overwriting" the old exe cache with a modified installer. – mark uy May 16 '18 at 15:20
  • My V1's ProductCode is set to "*". – mark uy May 16 '18 at 15:25
  • In WiX language that means generate it at build time. The MSI you built will have a ProductCode. That is what you need to uninstall. – Doc May 17 '18 at 11:07