2
votes

I am trying to install an update of a product (so that MSI will uninstall the old version and install the new one). The new MSI has the same upgrade code, and different productCode, packageCode. Also the productVersion number is larger than the old version. Still, getting "Unable to install because a newer version of this product is already installed.".

Old MSI data:
UpgradeCode = {D627BB25-59CB-4387-AF42-0127AC701DBE}
ProductCode = {be94f6df-5503-444b-98ff-f4b04fe993d5}
PackageCode = {D69BDC04-1053-490D-BBDF-3A2ABC3E1585}
ProductVersion = 3.9.2

Action 'RemoveExistingProducts' = 1550

New MSI:
UpgradeCode = {D627BB25-59CB-4387-AF42-0127AC701DBE}
ProductCode = {ae91c3e3-0a19-4b19-8c54-38b57eb2eb2f}
PackageCode = {a2be00dc-102e-4a32-a4c8-9294a81b24ba}
ProductVersion = 3.9.3
Action 'RemoveExistingProducts' = 1550

MSIEXEC Log:
MSI_Log.txt

What could be causing MSI to abort the installation?

1
I'd verify that the old MSI really is 3.9.2, since there's no actual supplied data attached that shows that original install. It's possible you have got this error because your guids appear to be lowercase. The docs for ProductCode say it must be uppercase, and I vaguely recall that the issue is related to upgrades and finding installed products.PhilDW
@philDW Thanks for the suggestions, but I verified the versions and they are correct (registry indicated correct version of the 3.9.2 version, I uninstalled and then did a clean install of the new version and its version is also correct). I changed the GUIDS to uppercase as is indeed required by MS, but still getting the same error... really frustrating...OSH
You must UPPERCASE your GUIDS and rebuild everything. MSI requires uppercase GUIDS. Don't ask me why.Stein Åsmul
Changing the guids in the new install won't help - if it is an issue with guids, the older installed product has a lowercase product code and you can't fix that if it's already shipped.PhilDW
You can recache the shipped MSI (just the MSI, without the CAB files) using a custom action scheduled in the UI sequence of the new version. advancedinstaller.com/user-guide/faq-misc.html#question112Bogdan Mitrache

1 Answers

4
votes

Thanks for all the helpful comments. 1'st issue was indeed the lowercase GUID I was using. After sorting that out the installer still refused to install ("A newer version ..."). Then we found a very nice tool called SupperOrca that does a diff of 2 MSI's.
The Diff showed that the upgrade actions table in my MSI is completely wrong. The tables' data was basically all messed up (I will explain how I generate the MSI). It said the the action to take was PREVIOUSVERSIONSINSTALLED instead of NEWERPRODUCTFOUND.

The issue was caused by our MSI generation process:
1. We use the "VisualStudio Installer Projects" plugin for VS2013. In the project settings we put ProdutVersion = 1.0.0.
2. after the MSI is generated we pass the result to a tool we made that updates the version in the MSI to the current release version.

Our mistakes were:
1. We didn't mark "update previous version" in the installer plugin.
2. We didn't update the upgrade table in the MSI.

I hope this helps someone else who tries to do the same. I would be happy to provide additional info if someone else stumbles on a similar issue.