Martin Ba
Martin Ba

Reputation: 38776

Increasing Version but keeping ProductCode the same?

I'm currently trying to understand the relationship between Windows Installer ProductCode and the Version attribute.

As far as I understand the examples I've seen so far, the ProductCode denotes a specific version, so increasing the version also should change the product code. (Indeed the example above uses Product Id='*').

To understand this better, I am asking myself whether there is any scenario that would keep the ProductCode the same but increase the Version? What would Windows Installer do with such an MSI, given a previous one with a different ProductCode (but same UpgradeCode) were installed?

I guess another variation on my confusing would be: If I onnly want to do "major upgrades" does Id='*' make sense or will I have to control the ProductCode somehow?

Upvotes: 0

Views: 426

Answers (2)

Christopher Painter
Christopher Painter

Reputation: 55581

IMO:

1) The MSI SDK doco is poorly written. It discusses the topic in a roundabout way without actually explaining your options.

2) The vast majority of MSI developers should use Major Upgrades which in WiX means Id="*", bump one of the first 3 fields in ProductVersion and author a MajorUpgrade element.

3) Minor upgrades are much stringent and error prone. You should be an expert in MSI and understand it and the component rules very well before deciding it's time for a Minor Upgrade. In other words you'll know when it's time.

FWIW when doing Major Upgrades "UpgradeCode" acts more like a ProductCode in that it's static. Think of UpgradeCode as a series of products and your ProductCode is always changing not because it's a new product per say but because MSI says you must change it to do a major upgrade.

Software gets refactored so much from build to build these days with so little functionality change that the whole description of major, minor and "small" (always disliked that one... who releases a product without changing the version number???) is pointless.

Upvotes: 4

PhilDW
PhilDW

Reputation: 20780

If you were to rebuild your MSI file with updated files and increment the ProductVersion, then you have a minor update that you could install with a command line of REINSTALL=ALL REINSTALLMODE=vomus (typically) that would update the existing instaled product. This is rare, IMO.

If you didn't use that command line you'd get that "another version of this product is already installed" message (if the package code was new for the new MSI, as it should be).

If you only do major upgrades then yes you need a new ProductCode every time, and increment the ProductVersion somewhere in the first 3 fields.

Upvotes: 2

Related Questions