We have multiple products. All can be installed separate but also installed at the same time. All are send as single MSI file. The issue is now the upgrade. If someone get a new MSI for one product it must fit at least to the major version of all other installed products.
The test with different upgrade code fails because if all are installed and each has the rule to allow the updates only within the same major version you can Deinstall one product and than install any version because there is no crosscheck
Reading the docu :
https://learn.microsoft.com/en-us/windows/win32/msi/upgradecode
The UpgradeCode property is a GUID representing a related set of products. The UpgradeCode is used in the Upgrade Table to search for related versions of the product that are already installed.
This sounds that we can use the same upgrade guid for all products and the installer can manage than the detection of the product versions for both.
Is this the correct way?
Or should we create a registry key „product major version“ and check this as central Storage over all MSI files.
Sample:
More details .. each product is a separate MSI file
- Product A
- Product B
- Product C
Product A and B can be installed separate but if they are on the same computer their major version must fit
Product C is exclusive which means it can’t coexist with A or B
Basic Idea with same update guid was
- Product A .. Update Code X
- Product B .. Update Code X
- Product C .. Update Code Y
On install of A or B make two test
- if Update Code Y is here abort
- If Update Code X is there Check major version abort if this does not fit or install or upgrade of A or B
On install C
- if Update Code X is there abort
- If Update Code Y is there Upgrade
From the other article a definitive solutions seems to give each product a own key but than the tests are more complicate and i have to know all keys in any product .. Adding entries to MSI UpgradeTable to remove related products
- Product A .. Update Code X
- Product B .. Update Code Z
- Product C .. Update Code Y
On install A
- if Update Code X is there and major version fit upgrade
- If Update Code Z is there and major version fit upgrade
- if Update Code Y is there abort
On install B
- if Update Code Z is there and major version fit upgrade
- If Update Code x is there and major version fit upgrade
- if Update Code Y is there abort
On install C
- if Update Code X or Z is there abort
- If Update Code Y is there upgrade
Regards