Answer
Do you want to make a change to your installation? If it’s a small change, consider creating a patch. A patch is a small file that contains only the differences between the old and new versions of an installation. An advantage to patches is that because of their size, they install more quickly than full application installations.
A patch updates an application previously installed with Microsoft Windows* Installer. Patches do not install full applications; they require that a previous version of the application be installed on the destination computer. If you have significant differences between the previously installed application and the new version, use an upgrade rather than a patch.
You can create three types of upgrades: a small update, a minor upgrade, and a major upgrade. Use a small update when you make minimal changes to the installation. An update does not cause the version of the application to change. When you add new files, make several minor changes, or fix bugs that cause changes, use a minor upgrade. With these types of changes, change the minor version number of the product. For significant changes to the installation, use a major upgrade. Major upgrades cause a full version change to the product. The table below shows installation changes with each type of upgrade. Typically, you create a patch for a small update or minor upgrade. For a major upgrade, it is recommended to create the upgrade using the Upgrades page in the Installation Expert rather than creating a patch.
Note: Minor upgrades can ony be deployed through the command line by using the following command line. The Minor upgrade is recached and repaired, so it can be installed over the previous version without changing the Product code but only though the following command line:
msiexec /fv <FullPathToMSI>
|
Version Number |
Product Code |
Package Code |
Upgrade Code |
Small Update |
No change |
No change |
Change |
No change |
Minor Upgrade |
Change |
No change |
Change |
No change |
Major Upgrade |
Change |
Change |
Change |
No change |
Now that you know what a patch is, when to use it, and what changes it makes in your installation, you can create a patch for your installation.
Create a patch
Troubleshooting Common Issues with Patches
Sometimes implementing a patch creates a problem with your application. The problem can be caused by the .msp file itself, can exist in the previous version of the application, or can be a combination of items created by applying the patch. This section identifies the most common troubleshooting issues you might encounter and explains how to solve them.
Files are not being updated as expectedThere are two explanations why your files might not update successfully. Like new installations, patches follow specific file versioning rules to determine if a file should be updated or remain as is on the destination computer. These versioning rules can create issues when patching.
All files that are in both the original and upgraded .msi files must be in their original components and have matching component GUIDs. If the component GUID is not identical between the two .msi files, the patch does not install properly. This typically occurs when you remove an older version of a file from the installation and add a newer version. To solve this, modify the source path of the file rather than removing it.
Files are not being removed as expected
Files you remove during an upgrade reappear in the patch installation since they were not removed from the original installation. To remove a file during an upgrade, add an entry to the RemoveFile table. For information about populating the columns of the RemoveFile table, see the topic titled RemoveFile Table in the Windows Installer SDK Help.
You get an error message indicating the upgrade patch cannot be installed by the Windows Installer service.
This message appears if you don’t have a previous version of the software installed on the destination computer. Since .msp files only contain the differences between your current version and your previous version, key files the service needs to apply the patch are missing. To resolve this error, install the previous version of the software on the computer before applying the patch.
The message can also appear if you do not have the correct previous software version installed on your machine. When you create a patch with the Patch Wizard/Patch Creation tool, you need to specify all previous versions that the current patch can update. If you do not have one of the specified versions of the software on your machine, the patch cannot install. Verify the .msi files you selected for your previous software versions by looking at the Specify Previous version dialog in the Patch Wizard/Patch Creation tool. Select an .msi and click the Details button to verify which previous versions the patch will update.
Use the tips in this article to successfully create and apply a patch to your installation. Troubleshoot problems that arise when applying a patch by reviewing the issues and solutions listed in this article, reviewing the log file the Patch Wizard/Patch Creation tool creates, and running UpgradeSync. For additional information about updating an application using a patch, see the topic titled Patching and Upgrades in the Windows Installer SDK Help.