Can anyone tell me how to make a universal transform or a template transform that will work on all msi's?
Question
Can anyone tell me how to make a universal transform or a template transform that will work on all msi's?
Answer
The trick is to get the validation conditions on the transform to be lenient.
The following validation conditions are available for a transform (these are stored in the transform's summary information stream):
MSITRANSFORM_VALIDATE_LANGUAGE MSITRANSFORM_VALIDATE_PRODUCT MSITRANFORM_VALIDATE_UPGRADECODE
Any one of the following version specifications (which would also have a validation equality flag as well)
MSITRANSFORM_VALIDATE_MAJORVERSION MSITRANSFORM_VALIDATE_MINORVERSION MSITRANSFORM_VALIDATE_UPDATEVERSION
You would basically want to not validate any of the transform validation conditions that ensure product code, upgrade code, product version, and product language matching.
Depending on the types of changes you are making, you may want to suppress all of the error conditions as well to ensure that the transform can be applied without failure.
More specifics on the transform summary information stream can be found in the MsiCreateTransformSummaryInfo API documentation.
You can easily accomplish this using the msitran.exe tool provided in the Windows Installer SDK development tools section.
A no validation suppress all error transform would be generated using something similar to:
msitran -g simple.msi simple2.msi simple.mst abcdef
Hope this helps,
- Carolyn Napier
Microsoft Windows Installer Team
Content credit belongs to
- Carolyn, MSI Team Dev Lead. You can get other Carolyn insights about developing for Windows Installer from the Windows Installer Chat Archives
[Author: Robert Flaming]
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm.