Reputation: 555
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.
Upvotes: 1
Views: 346
Reputation: 708
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 {}
Upvotes: 0