Greg Domjan
Greg Domjan

Reputation: 14115

How do you correct 2 unrelated msi having the same UpgradeCode

I'm a bit light on detail but I think we have a problem.

Using the copy/paste method of boostrapping an installer project in wix, it appears we seem to have missed updating the UpgradeCode to ensure they are unique...

<Product Id="*" UpgradeCode="SOME-BAD-FOO">

So, it is my understanding that this is "not good" (r)(tm)

At the moment the users of the 2 installers with this issue are unlikely to have installed both, but they may in future.

Looking for ideas on how to fix this issue before it becomes an installed nightmare... Maybe Windows cannot even install both at the same time? Is there some way to perform an upgrade install/patch and change the UpgradeCode?

Upvotes: 3

Views: 264

Answers (2)

Christopher Painter
Christopher Painter

Reputation: 55601

One question I'd ask would be are you using Major or Minor Upgrades.

If Minor, I've never tried changing the UpgradeCode but not the ProductCode. I think it would be OK but I'm afraid to find out.

If Major Upgrades, do the products use different version number ranges? 1.0-1.9 , 2.0-2.9? If so, it would possible to change the UpgradeCode in both installers ( just leave the 'dirty' guid in your past ) and then use the old guid in your UpgradeTable with a version # as a the key to identifying the correct product codes.

If not, do you know every single ProductCode that was ever released to the wild for both products? A custom action could be used to query MSI for installed ProductCodes and then compare it to a list of known guids to decide whether it applies or not.

You'll have to leave the code in forever though. Old versions of software have a tendency to stick around forever.

Upvotes: 2

Bogdan Mitrache
Bogdan Mitrache

Reputation: 11023

So, it is my understanding that this is "not good" (r)(tm)

That is really not good, you should be careful to not do that in the future as it can give you, and your users, a lot of headaches.

However, the solution is very simple. All you need to do is to change the upgrade code for one of the packages, and to add the current upgrade code in the Upgrade table for the new version, so it removes it, if it is found on the machine.

If you are sure the second version will be installed by all your users that have installed the first one, in the next release you should remove the upgrade code the from Upgrade table, to make sure you don't have any conflicts with the second package, i.e. the still using the first upgrade code.

Upvotes: 4

Related Questions