1) Create a folder named for example C:MSP an put the SDK MSP tools in it.
mpatch.exe, MsPatchC.dll, PatchWiz.dll
2) Create a Target Folder for example C:MSPTarget
3) Copy the structure from the delivered original released product in the Target folder and put its MSI at the top of the structure.
4) Create an Upgraded Folder for example C:MSPUpgraded
5) Copy the content of C:MSPTarget into the C:MSPUpgraded.
6) Overwrite the files that need to be patched with their newer better versions.
7) Edit the C:MSPUpgradedMyAppXYZ.MSI and for example change the versions of the versioned files, the size and dates of the un-versioned files that need to replace the old and bad ones on the target machine.
Change the Package Code of the Upgraded MSI (do or do no change the version number in the Property Table of the Upgraded MSI see the Small Update vs. Minor Upgrade rules on the Microsoft Web site)
8) Update the PCP file (Patch Creation Properties File) to point to the Target and Upgraded MSIs
For example:
ImageFamilies Table
PDSCAN DSCANPropName 93 3000
PatchMetadata Table
It is pretty self-explanatory
Properties Table
It is pretty self-explanatory
TargetImages Table
PDSCAN_error C:MSPTargetMyAppXYZ.MSI PDSCAN_fixed 1 0
UpgradedImages Table
PDSCAN_fixed C:MSPUpgradedMyAppXYZ.MSI PDSCAN
Save the PCP file.
9) To create the patch Run the command line:
Msimsp.exe -d -l MyAppXYZ.log -s MyAppXY.pcp -p MyAppXYZ.msp
10) To install the patch Run the command line:
msiexec /l*v MyAppXYZInstal.log /p MyAppXYZmsp REINSTALLMODE=omus /qb
Reference: http://www.contactez.net/support/index.html