D. G. Schneider Lions Club Volunteer Project

How To Create and Install A MST (To Transform A MSI)

The process to create a MST is pretty simple and straight forward. You do not need an expensive software to create a MST.
Also if you use your own processes you will not be in complete darkness if a problem arises with the MST.

A transform is a collection of changes applied to an installation.
A transform can modify information that is in any persistent table in the installer database.
A transform can also add or remove persistent tables in the installer database.
Transforms cannot modify any part of an installation package that is not in a database table, such as information in the summary information stream, information in substorages, or files in embedded cabinets.

For example a MST can be used to remove multiple existing products. To do so move the RemoveExistingProducts action at about 1450, use the Upgrade Table to list the products' upgrade codes to be removed or upgraded, and add the property SecureCustomProperties in the Property table. A MST can also be applied to set the language used by a merge module (can be changed by applying a transform to the merge module before merging).

For more information concerning MsiCreateTransformSummaryInfo function go to
For a sample Microsoft example go to

List of Free Microsoft VB Scripts delivered in the MSI SDK:

WiSubStg.vbs - adds a transform or nested MSI as a substorage
WiGenXfm.vbs - generates a transform from two databases, or compares them
WiUseXfm.vbs - applies a transform to an MSI database
WiLstXfm.vbs - lists an MSI transform file (CSCRIPT only)

Work sequence to create a MST

You are done!

You can view the content of a MST using the Microsoft utility MSTVIEW.EXE delivered with orktools.
Search Microsoft website to download the Office Resource Kit Tools.

Overview of different transforms

Embedded transforms

Embedded transforms are stored inside the .msi file of the package. This guarantees to users that the transform is always available when the installation package is available. Alternatively, transforms may be provided to users as standalone .mst files.
To add an embedded transform to the transforms list, add a colon (:) prefix to the file name.
Because the installer can always obtain the transform from storage in the .msi file, embedded transforms are not cached on the user's computer.

To add a storage named MyProductTrans1 to MyFirstVersion.MSI  and containing the transform you created, change directories to the folder containing Emb.vbs then enter the following command line.

Cscript.exe Emb.vbs MyFirstVersion.MSI TheTransForm.mst MyProductTrans1

To install with the customizations, enter the following command line.

msiexec /i MyFirstVersion.msi TRANSFORMS=:MyProductTrans1

Use a colon to indicate that the value of the TRANSFORMS Property refers to an embedded transform.

Secured Transforms

Secured transforms are sometimes necessary for security reasons.
Secured transforms are stored locally on the user's computer in a location where, on a secure file system,the user does not have write access. Such transforms are cached in this location during the installation or advertisement of the package. Only administrators and local system have write access to this location.
A non-admin user would not be able to modify the transform file. During subsequent installation-on-demand or maintenance installations of the package, the installer uses the cached transforms.
To specify secured transform storage, set the TransformsSecure policy, set the TRANSFORMSSECURE property, or pass the @ or | symbol in the transforms list. Note that you cannot include secured and unsecured transforms in the same transforms list. See Applying Transforms.
The removal of the product by any user removes all secured transforms for that product from the user's computer.

Unsecured Transforms

Transforms that have not been secured as described in Secured Transforms are unsecured transforms by default.
To apply an unsecured transform when installing a package, pass the transform file names in the TRANSFORMS property or command line string. Do not begin the string with the @ or | characters or set the TransformsSecure policy or the TRANSFORMSSECURE property. Note that you cannot combine unsecured transforms and secured transforms in the same transforms list.
If the package is installed or advertised as a per-user installation, and has unsecured transforms, the installer saves the transform source in the Application Data folder in the user's profile. This enables a user to maintain their customization of a product while moving between computers.
If the package is installed or advertised as a per-machine installation, and uses unsecured transforms, the installer saves the transform source in the %windir%\Installer folder.
During a first-time installation of the package, the installer first searches for the transform at the source supplied by the TRANSFORMS property or command line string. If this source is unavailable, the installer then searches for the transform at the source of the package next to the .msi file.
During a maintenance installation, the installer searches for the transform at the cache location. If the cached copy of the transform becomes unavailable, the installer searches for the transform at the source of the package next to the .msi file.

About Dominique Gérard Schneider since 1995 - Developing solutions that really help!
Participation on Google on YouTube

Tek-Tips Forums dgschnei
Listed since 1996 ixquick
Community Services

platform sdk dgschnei
About Me

Return Home - Index