Reputation: 902
Basically I need to change this behavior:
Installing a product with the same version and upgrade code (but different product code) is allowed and treated by MSI as two products.
I need this to be threated as Major Upgrade. So installing v 1.0.1 over v 1.0.1 (old build, different ProductCode) will uninstall old one. This is because I'm not interested in changing versions unless we're going for public release.
I have:
<Product Id="*" UpgradeCode="2067109E-DCDA-4639-B4FC-B95E0A239E1A" Version="1.0.1"...
....
<MajorUpgrade AllowSameVersionUpgrades="yes" ...
What I have now is two entries under Add/Remove Programs, which is not what I want.
Upvotes: 4
Views: 5084
Reputation: 7625
Just add a fourth version number (Major.Minor.Patch.Build) and increment the build number for each new build.
Using the same UpgradeCode
but a different ProductCode
, will allow any installer with the same (Major.Minor.Patch) to be installed as an upgrade, but at least you will know what build version is installed.
Make sure to use
<MajorUpgrade AllowSameVersionUpgrades="yes"
Note that this will not prevent earlier builds to be installed when a later build is present.
Upvotes: 2