2
votes

I want to create an Minor Upgrade for a product, I already define a WIX project that generates the MSI installer .

Directions from Microsoft states that in a Minor Upgrade, the ProductCode should not be changed, but ProductVersion must be changed.

Furthermore I change the AssemblyInfo of my application in order to match the ProductVersion. The change in the AssemblyInfo involves change for the AssemblyVersion and AssemblyFileVersion.

After these changes I generate another installer, and now I have two installers:

  • Installer_1.0.1.msi (A)
  • Installer_1.0.2.msi (B)

I installed A (double click) then proceed to Install B (double click), but I got this: enter image description here

Microsoft states that to apply a minor upgrade I should see how to apply a Small Update, I choose to try Reinstalling the product :

The steps described suggest to use the command
msiexec /I Installer_1.0.2.msi REINSTALL=ALL REINSTALLMODE=vomus

Checking the msiexec command line reference I found that:

  • v: Runs from source and re-caches the local package

  • o: Reinstalls if file is missing or if an older version is installed

  • m: Rewrites all required computer-specific registry entries

  • u: Rewrite all required user-specific registry entries

  • s: Overwrites all existing shortcuts

    That's what I need!!! (I thought to my self).

Tried the command, the result was:

  • No file was changed
  • The version in control panel/Programs changed
  • The installer cache change and I was not able to uninstall the product from Control Panel/Programs/Uninstall

I proceed to change the command parameter o for a because it Forces all files to be reinstalled.

Same result.

My objective is to be able to change the files without having to manually uninstall the product (This can be achieve with a MajorUpgrade, but it implies the change of the ProductCode).

What am I missing in this process?

UPDATE: If I setup the ProductCode to be dynamic it works as expected, but it would become the minor upgrade in a major upgrade (According to the technical library).

2

2 Answers

1
votes

The question is somewhat older, but the correct answer is:

What you have done, works, if done right, the two main points are:

  • Package Id should be different of new version (minor upgrade)

  • (but) use REINSTALLMODE=vemus instead of vamus in a production environment , the latter is a worst practice pattern, and if you use it, then only for a quick test ("all files overwritten, no matter which version").

So the command line is: msiexec /I Installer_1.0.2.msi REINSTALL=ALL REINSTALLMODE=vemus

This surely works. "Only" (yes) files which have been changed after the first installation (by manual edit or changed with a program) will not be updated (for safety). You will need other methods for this (look for "companion file(s)").

But the described way of a minor upgrade though feasible is not to recommend for a production environment, maybe only for MSI experts.

1. At least, update the file versions of all files in the setup, then you don't have to rely on "vemus" (or vamus), and moreover, you don't loose the overview and error possibilities are highly minimized.

2. It is recommended by most sources (and I would agree) to not use Minor Upgrades because Major Upgrades work smoother, especially for non experts.

If install performance is a point, you can even use the uninstall old version after install pattern there (means "only", the action "RemoveExistingProducts" is at the final part of the setup (see MSDH help for this)).

3. Next step of complexity (but you have to deal with) is using Patches (.msp files) as non full updates.

-1
votes

For Minor Upgrades you have to have same ProductCode and UpgradeCode. But you have change the ProductVersion, Package GUID and also the versions of the binaries (DLL & EXE files) in the MSI package should be greater than the previous version