Create a Minor Upgrade for an application using InstallShield

Upgrades are little complex compared to the new installer. This guest article from Bhuvana aims at providing the requirement for minor upgrade, the steps to create it and options to install the same. Minor upgrade is a type of Product upgrade that Windows Installer supports. A minor upgrade can be used to add new features and components but cannot reorganize the feature-component tree.

Requirement for Minor upgrade:

Add a new subfeature

If the new subfeature consists of new components only, you can use a minor upgrade. If the new subfeature consists of existing components, you must use a major upgrade.

Add a new component to a new feature

In general, a minor upgrade should not include a new top-level feature. However, new subfeatures of existing features are allowed. If you are adding a new subfeature for a minor upgrade, set two of the subfeature’s properties as follows so that they are installed correctly during a minor upgrade:
o    Remote Installation—Set this property to Favor Parent.
o    Required—Set this property to Yes.
The user interface of a minor upgrade does not usually show the feature tree; however, maintenance mode for the updated installation typically does expose the feature tree. If you want the new subfeature to be excluded from the feature tree so that end users cannot deselect it, set the subfeature’s Display property to Not Visible.

Add a new component to an existing feature

A new component can be added to an existing feature if the version of Windows Installer is 2.0 or later

Add, remove, or modify any of the following: files, registry keys, or shortcuts.

If the file, registry key, or shortcut is in more than one component and the component is shared by two or more features, a major upgrade must be used.

Codes Associated with the Minor Upgrade:

Package CodePart of the Summary Information Stream, the package code identifies a particular database. The package code is not a Windows Installer property. Any two .msi databases with identical package codes must have identical contents. So it is recommended to change the package code for each and a must for Minor Upgrade.

ProductVersion—This is a Windows Installer property that contains the product version. Note that Windows Installer uses only the first three fields of the ProductVersion property for version comparisons. For example, for a product version of, the 4 is ignored. (Note that this is true for comparisons of ProductVersion values, and not for file versions.)

Package code and Product Version needs to be changed for Minor Upgrade.

Steps to create Minor Upgrade:

  1. Change the Package code and Product Version to create a minor upgrade
  2. Add feature / component by following the guide lines in Section: Requirement for Minor upgrade
  3. Add Remove or Modify files, registry keys and shortcuts.
  4. Add minor upgrade item in upgrades view (this is optional).
  5. Build and use the installer for upgrade.

Running a Minor Upgrade:

With Setup.exe

If you build a release that includes Setup.exe, your latest installation will be minor upgrade enabled. Setup.exe can detect when a previous version of your application exists on a target machine. When Setup.exe detects a previous version, it will run the rest of your installation in minor upgrade mode.
If you have selected the option “Create installation launcher (setup.exe)” when you built the release and if you get an error as Figure1, while running the installer, then you will have to specify these parameters in the generated Setup.ini file:


Without Setup.exe

If you intend to distribute your installation without wrapping it in Setup.exe, there is a manual process that your end users must follow to start the installation. For this reason, you should consider using Setup.exe; however, you can achieve similar results without it. The Installer properties REINSTALL and REINSTALLMODE must be set from the command line to start an installation in upgrade mode. In all but the most advanced scenarios, the property REINSTALLMODE should be set to vomus and the property REINSTALL should be set to ALL. A typical command line can look like the following: msiexec.exe /i \product.msi REINSTALLMODE=voums REINSTALL=ALL

If the update contains features that you do not want to update, you should set REINSTALL to a comma-separated list of the features that you want to update, as in the following command: msiexec /i \product.msi REINSTALLMODE=voums REINSTALL=F1,F3,F5

The feature names you use in the REINSTALL property are case-sensitive.

If you try to install two msi packages with different package codes, but with the same product code, you will get an error message as shown in the below figure,
To overwrite the existing product with a newer version, you should perform a small or minor update. This requires that you set the following properties on the msiexec command line: msiexec /i Yourapp.msi REINSTALLMODE=vomus REINSTALL=ALL

The important part is the “v” in the reinstall mode settings. It forces the use of the new msi file instead of the cached copy. Therefore it can’t be set inside the package. The rest of the REINSTALLMODE flags make sure that existing files get updated, new files get installed, registry entries are re-written and shortcuts are created. REINSTALL=ALL means that only those features, that were selected by the user during the install of the old version get updated. Unselected features should not be added.

Difference between Small and Minor update:
Small and minor updates are very similar. The only difference is that in a minor update the product version is increased (in any of the first thee fields), while a small update leaves the version number unchanged or increases only the fourth field of the number. You can update your product with a small or minor update package only if the product code is unchanged. To replace an existing application with a package that has a different product code, a major upgrade is required.

Bhuvana specializes in InstallShield & MSI Installers and her primary responsibility at work is “Build & Release” which includes creating Setups and Source Control Management. If you want to get in touch, her LinkedIn Profile is – Here. (PS: Do mention in the Linkedin request that, you read her article on msigeek. We do not want to give her un-necessary Spams )

Do comment on this article, if you have any inputs / suggestions for Minor upgrade!