Skip to content

New MsiTransformFile

Raymond Piller edited this page Feb 28, 2019 · 3 revisions

Create an MST file on the fly.

Description

When trying to DevOps a solution to creating dynamic packages, it's could be necessary to create a batch of MST files for different deployment scenarios. This function can handle Replacem

Parameters

MsiPath

  • Required
  • [IO.FileInfo]

Path the MSI file that needs to be transformed.

MstPath

  • Required
  • [IO.FileInfo]

Path the outputted MST file.

Properties

  • Required
  • [hashtable]

This is the name/value pairs of properties that you want injected into the MST. If the property already exists in the MSI, it will be replaced via the MST. If the property does not already exist in the MSI, it will be added via the MST.

Example

$newMsiTransformFile = @{
    MsiPath      = 'dev\TestMSIs\7z1900-x64.msi'
    MstPath      = 'dev\test.mst'
    Properties = @{
        ALLUSERS           = 'ValueChanged'
        MSIRMSHUTDOWN      = 'ValueChanged'
        SOMETHINGTOADD     = 'ValueAdded'
        SOMETHINGELSETOADD = 'ValueAdded'
    }
}

New-MsiTransformFile @newMsiTransformFile

Notes

Clone this wiki locally