How to Apply a Patch to an Administrative Install

Let’s suppose we have an MSI called setup.msi and a patch for it, called patch.msp
If we want both the setup and the patch to be installed we have two options.

Option #1
Install both separately:
1. Install setup: msiexec /i setup.msi [...other params]
2. Install the patch: msiexec /p patch.msp [...other params]

Option #2
Install the patched MSI at once.

We well explain here the second option.

1. First, we need to create the administrative installation (setup.msi)

Run: msiexec /a path_to_setup\setup.msi TARGETDIR=folder_for_admin_install
In the folder you’ve defined as folder_for_admin_install, we can find setup.msi and the extracted files..

2. Then, we`ll apply the patch:
Copy the patch.msp to the same folder as the admin install (not mandatory, but recommended)
BackUp the existing setup.msi, for it will be altered.

Run: msiexec /a folder_for_admin_install\setup.msi /p folder_for_admin_install

This will create a new MSI (+side files) that includes the old msi+the patch. It will replace the previous setup.msi. Voila, done!