About Windows Installer, the .NET Framework, and Visual Studio.
Previously I discussed conceptually how to extract files from a patch, mentioning that the transforms contained within patches are stored as sub-storages and the cabinets that contain the files are stored as sub-streams. I've had a tool for a while that extracts the transforms and cabinets from a .msp file and wanted to share the slightly modified source for public consumption. This tool can extract transforms and binary streams from other Windows Installer file types such as .msi and .msm files, as well as other compound storage documents.
You can download the source and a release binary that programmatically does what I previously explained. This does not expand the files into the target directory structure, which is best handled by patching an administrative installation. What's nice about extracting the cabinet file is that you get all files for all target products if the patch targets multiple products, which is common for Developer Division.
Extracting the transforms - both the patch transform and the non-administrative transform - can be handy in determine which transform transforms what data. For example, in identifying a patch applied to an administrative transform, I need to write a property to the non-administrative transform. To check this, I can extract the transforms and apply the non-administrative transform to the target product in Orca. If I simply applied the patch in Orca, I'd see both transforms applied and couldn't be sure which transform wrote the property to help identify the patch as a client patch.
Download the tool
PingBack from http://blog.ze-games.net/fahrenheit-pc-game-e-o-windows-vista-64-bits-so-com-maracutaia/
PingBack from http://www.it-psycho.de/2008/05/02/0xc06d007e-2/
PingBack from http://www.bitfrickler.de/2008/07/bootcamp-treiber-unter-vista/
Thanks!!!! You've saved me a TON of time with this.
Heath, Thanks for the blog, it is indeed very informative.
I tried "What I recommend is opening the product in question in Orca (part of the Windows Installer SDK, and a most invaluable tool!) then click on Transforms->View Patch and apply the patch. Look in the File table for any green rows or cells for the changes the patch *might* make, assuming newer versions of files are present on the system"
but OCRA threw an error saying the "This patch can not be applied to the packages with the current product code" Further exploring the MSP using OCRA I realized that the Product Code column under the MsiPatchSequence Table is empty. I am sure that the MSI and MSP point to the same product, but I am not sure how the MSP was generated. Is there any other way of linking the two together instead of the product code?
@Dhruv Sakalley, the ProductCode column of the MsiPatchSequence table isn't required nor recommended (if you need it, your patching solution is too complicated). The target ProductCode is encoded first and foremost in the embedded transforms. They may be listed in the patch's summary information stream, but that's also not required nor always definitive.
If you want to see what ProductCodes the patch targets via its transforms, you can use http://psmsi.codeplex.com using the get-msisummaryinfo cmdlets on the MSP with the -includetransforms switch parameter.