Patch overview

If you use the Windows Installer to install your integrating application, you must use patches created with Windows Installer to apply updates for your integration. Patches are typically used for small changes, like code corrections. They’re typically not used for large changes like table structure changes. Patches are easily applied by the user or by the automatic update process in Microsoft Dynamics GP.

Patch files have the additional advantage of being included in the “repair” operations that can be performed by Windows Installer. A repair operation will automatically re-apply any patches that have been installed for your integration, ensuring that the most current version is being used after a repair.

This is why when you use Windows Installer for your integration, you shouldn’t manually update an installation with dictionary chunk (.cnk) files. The repair process won’t include any of the updates you applied manually.

When you create patch, you will begin by creating a full build of your updated integrating application. Be sure that you’re incrementing only the build number for the updated version. The major and minor version numbers should remain unchanged. New installations of your integration will use the full installer for the updated version of your integration. Existing installations of your integration will use the install patch to move to the updated version of your integration.

A WiX template project for a patch is included in the Installer folder within the Samples folder of the Dexterity install. The following are the basic steps needed to create an installer patch using the WiX template provided:

1. Complete the installer for the updated version of your integration.

This is a complete installer for your integration, created using the procedure described in Creating an installer. The build number for this updated version must have been increased.

2. Locate the baseline installer for your integration.

The “baseline” installer for your integration is the complete installer you created for the initial version of the integration. The patch will contain the differences between the “baseline” installer and the updated installer. In effect, this makes the patch cumulative, including any of the updates in previous patches.

3. Extract the baseline and updated installers.

This process expands the installer files into their individual components so the two versions can be compared. This tells the installer which components need to be included.

4. Modify the WiX project file.

A separate WiX project file is used when creating a patch. You will use a text editor to modify the template patching project included with Dexterity, specifying characteristics for the patch you’re creating.

5. Build the source for the patch.

Using tools from the WiX toolset, you will create the Windows Installer .pcp file that contains the information needed to create the patch.

6. Create the patch file.

Using the MsiMsp.exe application included in the Windows Installer SDK, you will create the patch for your integration.

Documentation Feedback