Validating MSI Updates and Patches

by Robert Dickau, Principal Technical Training Writer, Flexera Software

Introduction

The success of a Windows Installer–based update package involves a long list of considerations when the update is being performed. These considerations involve file versioning, key file information, product and component GUIDs, and more, and differ according to the update type (small update, minor upgrade, or major upgrade) and packaging (full installation or patch package).

InstallShield supports different validation rules for upgrades and patches, which can assist you in identifying and avoiding potential problems. This white paper describes these built-in validation rules, and how to address any validation warnings or errors that occur.

Learn More about InstallShield

If you wish to learn more about the capabilities of InstallShield, please visit the Flexera Software Web site at www.flexerasoftware.com/installshield

Using the InstallShield Environment

This white paper frequently refers to the InstallShield development environment. It is assumed you are familiar with the general layout of the InstallShield interface, which contains a list of views with which you can modify different portions of your installation project.

For example, the General Information view is where you set general product and project properties; the Setup Design view enables you to edit the features, components, and component data used by your project; the Registry view enables you to modify the registry data installed by your installation program; and the Direct Editor view gives you access to the raw MSI database tables.

It is also assumed you are familiar with some of the wizards available with InstallShield, such as the Release Wizard and Component Wizard.

  • The Release Wizard, available under the Build menu and also from the Releases view, lets you describe the properties—media type, compression settings, and so forth—of a release, and then builds the specified release image.
  • The Component Wizard, available by right-clicking a feature in the Setup Design view, lets you create special types of components, such as components for COM servers, fonts, and Windows services.

The InstallShield Help Library contains information about using every view and wizard in the InstallShield environment. The InstallShield Help Library is available when you press F1 with any view selected; you can also select Contents from the Help menu to view the help library.

In addition to the graphical environment, InstallShield provides several tools for modifying and building projects from the command line or an external script. For example, to build a project from the command line, batch file, or other automated process, you can use the executable IsCmdBld.exe. The IsCmdBld executable is located in the System subdirectory of the InstallShield distribution directory

To rebuild a project, you pass IsCmdBld the project file path, the product configuration name, and the release name that you want to rebuild. A sample command appears as follows:

iscmdbld -p C:\ProductName.ism -a BuildConfig -r ReleaseName

In addition, InstallShield provides an Automation interface, with which you can modify the contents of a project file without using the graphical environment.

Performing Upgrade Validation

By default, InstallShield will perform upgrade validation each time you build a release image. You can change this by pulling down the Tools menu, selecting Options, activating the Validation tab, and selecting the desired behavior.

When you perform a build, the upgrade validation results are displayed in the Build tab of the output window at the bottom of the InstallShield environment. Any messages displayed will contain a validation rule number and a description of the project elements involved in the rule.

Any validation warnings or errors will also be displayed in the Tasks tab of the output window.

You can click the error number in the Error Code column to obtain more information about that error from the InstallShield technical-support Web site.

If you build a project from the command line or a batch file using Iscmdbld.exe, the update validation results will be displayed at the command prompt and written to the build log file.

You can also use the Upgrade Validation Wizard, in which you browse for your latest and previous product versions, and then run upgrade validation on the two versions. To launch this wizard pull down the Build menu, select Validate, and then select Upgrade Validation Wizard. After you browse for the MSI databases being validated, the wizard displays information, warning, and error messages in the Summary panel, pictured in the following figure.

Similarly, you can right-click an upgrade item in the Upgrades view and select Validate Item to carry out validation on that item.when installed to directories with spaces.

Validation Rules

Many of the InstallShield validation rules apply only to certain types of updates. The categories of upgrade validation rules are the following:

  • All types of upgrades: Val003, Val005
  • Minor upgrades: Val001, Val002, Val004, Val006, Val007, Val009, Val012
  • Major upgrades: Val008, Val013, Val014
  • Patches only: Val011, Val015

The following are the built-in upgrade validation rules.

Val001: Files removed from a later product version should have corresponding RemoveFile records. If a file that existed in the earlier version of your project is no longer present in the later version, the minor upgrade process will not remove the file unless you add a corresponding record to the RemoveFile table.

This is an excerpt. Download the entire pdf: Validating MSI Updates and Patches