Create a Windows Installer patch (MSP) file

ImportantThe following article uses options that are available starting with the Enterprise edition and project type.

This tutorial will guide you step by step into the creation of a simple Windows Installer patch (MSP) file project from scratch and building it in order to obtain an MSP package. It is addressed to those who have previous experience in using the Advanced Installer application to create MSI packages but have no experience in creating patches.

Let's start from the project that we created in the Simple Installation tutorial. After the "Build and install" step, we have created our 1.0.0 MSI. Save it in a safe place.

Go to the "Product Details" page and increase the version in the "Product Version" field to 1.0.1. When moving to another page you will be prompted, thus you should choose Keep existing as the update method.

After modifying and building the project, we will have two MSI packages (one for the 1.0.0 version and one for the 1.0.1 version) and we want to create a MSP file that will upgrade an installed 1.0.0 "Long Story" to 1.0.1.

1. Create Patch project

If Advanced Installer is not currently running, start it by double-clicking on the desktop icon or by selecting it from the “Start > All Programs > Advanced Installer” menu. When the application starts, you will be presented a dialog where you can choose the type of the project you want to create.

Create Patch project

Select the “Updates” > “Patch” type and press the [ Create Project ] button. The new project has been created and from now on you will edit it.

Save Project Save the project by using the [ Save ] toolbar button and choose the file name and the destination folder. This will also be the folder where your Windows Installer patch package (MSP file) will be created. Give it an appropriate name, "story-patch.aip" for this example.

2. Create Images

The most important step in creating an MSP package is creating the Upgraded and Target images.

ImagesSwitch to the “Images” page by selecting it in the left-side panel.

New Upgraded Click on the [ New Upgraded... ] toolbar button, browse to the 1.0.1 version of the "Long Story" product and select the “story.msi” file. A Windows Installer dialog will briefly pop up while the Administrative Image is being extracted.

New Target Click on the [ New Target... ] toolbar button, browse to where you have stored the 1.0.0 version of the "Long Story" product and select the “story.msi” file.

Created Images

3. Build and install

Now that you have created the Upgraded and Target images, let's build the MSP patch package.

First you need to make sure that the patch respects the Patch Rules.

Build Project Click on the [ Build ] toolbar button and a “Build Project” dialog will appear showing you the build evolution.

ImportantThe Windows Installer patches are built using the MsiMsp tool. Read more in External Tools.

Run Project Once the build is complete, click on the [ Run ] toolbar button. The setup wizard will appear.

TipYou must have the version 1.0.0 of the product installed in order to be able to patch it with this MSP.

Congratulations! You have created your first Advanced Installer MSP patch package. By default, the patched “story.txt” file is installed in "C:\Program Files\Story Teller\Long Story". Browse to that folder in Windows Explorer to check.

4. Video tutorial