Not-So-Basic Concepts

Product Code vs. Package Code

The Product Code is a GUID that is used to determine if a certain type of your application is already installed on the Target PC. Think of it as a model number or model name. For example: MS would use the same Product Code for Outlook 2003 regardless of the native language of the package. Therefore Outlook 2003 French version, Outlook 2003 USA version and Outlook 2003 Swedish version would all have the same Product Code.


The Package Code is a GUID that is used to determine if a certain version of your application is already installed on the Target PC. Think of it as a serial number of your package. For example: MS would use a different Package Code for Outlook 2003 for each native language version of the package. Therefore Outlook 2003 French version, Outlook 2003 USA version and Outlook 2003 Swedish version would all have different Package Codes.


Ok, I know what you are thinking: WHY!

Well I know you can use the Product Code to uninstall an application. In MS' case, if you try to install Outlook 2003 French over top of the Outlook 2003 English on your PC, the package would say that it's already installed.


You cannot, however, use a Package Code to uninstall an application. Other than using it as a serial number I don't know what it's good for.


One thing you could do is use the same Product Code for a package that you plan on updating a lot. That way, you would automatically be told that your old version is already installed and needs to be uninstalled first. I could see other things this could be used for.


You can get the Product Code in the Installation Expert tab in Project Details:



You can get the Package Code in the Setup Editor tab in :


Both can also be found as Properties in Setup Editor.

Installing MSP files

Gotcha: If you perform a silent install of an MSP file like this:

msiexec /p patch.msp /qn


it will not patch an existing installation. It will only update the locally cached copy of the MSI database. Use this command line instead:

msiexec /p patch.msp REINSTALL=ALL REINSTALLMODE=omus


Double-clicking the .MSP file will patch an existing installation as well as the locally cached copy of the MSI database because the dialogs are run and they in turn set REINSTALL and REINSTALLMODE for you. When you run the patch unattended, the dialogs are not displayed and the properties are not set. This is why the properties must be set at the command line.


How to uninstall MSP patches

The only way to uninstall a patch is to uninstall the MSI, the patch will come off with it. The ability to just remove the patch is something that [might be] planned in MSI 3.0. People say that you may be better off creating a proper upgrade MSI rather than an patch file (at least until Windows Installer version 3.0 delivers on its promises to make patches a easier and more stable.)