Creating Minor Upgrades

InstallShield 2013

Project: This information applies to the following project types:

Basic MSI
InstallScript MSI

Once you have determined that a minor upgrade is the best upgrade solution for you, you can start by adding a minor upgrade item in the Upgrades view. After you build an installation with a minor upgrade item, the build engine performs a series of tests to determine whether that your latest installation can successfully upgrade the previous version of your installation. However, adding a minor upgrade item is not necessarily required for a minor upgrade to function properly. See the Running a Minor Upgrade with Setup.exe section below for more details.

Any new features that you add to the latest version of your installation must be added as subfeatures of existing features. These new features must have the Remote Installation property set to Favor Parent and the Required attribute set to Yes in the Features view.

Minor Upgrades at Run Time

At run time, the end user will first see a message box announcing that an upgrade will occur. This message specifies the name of the previous product, alerting the end user as to which existing application will be updated. At this point, the end user can stop the installation process if desired. This prompt is followed by a Welcome dialog, and when the end user clicks Next on the Welcome dialog, the setup will install its new resources. While installing its resources, the installation will update the progress bar in the Setup Progress dialog so that users will be able to track the upgrade process.

Tip: In the Upgrades view, you can disable the initial upgrade prompt when you click Upgrade Windows Installer Setup in the explorer and configure the Common tab properties for small updates and minor upgrades.

Note: At run time during a minor upgrade, Windows Installer does not reinstall a component if its key file would be downgraded in the process. Therefore, the key file in the upgrade needs to have a version number that is equal to or greater than that of the key file in the old package. The exception is when the end user sets the REINSTALLMODE property to a, which forces the installation of all files, regardless of version. For more information about file overwrite rules, see Overwriting Files and Components on the Target System.

A minor upgrade installs its new resources over the application that currently exists on the target machine. If you want to completely uninstall and then reinstall your application, you should consider a major 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.

Running a Minor Upgrade Without Using 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=vomus 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=vomus REINSTALL=F1,F3,F5

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

Note: Do not set REINSTALL equal to ALL for a first-time installation.

A critical point to note is that you do not want to set these properties on the command line unless a previous version of your installation already exists on the target machine. If you do, the installation will appear to run in minor upgrade mode, and your application files may not be installed. Be sure that your end users will be able to discern when command line should and should not be used.

Note: The REINSTALLMODE attribute v is very important if you are performing a minor upgrade. This parameter tells the installer to refresh its internal setup cache for your product with the new installation package. Without this parameter, your installation will have no knowledge of any of the changes that you have made to the latest installation package.

See Also