-
Notifications
You must be signed in to change notification settings - Fork 0
New MsiTransformFile
Raymond Piller edited this page Feb 28, 2019
·
3 revisions
Create an MST file on the fly.
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
- Required
[IO.FileInfo]
Path the MSI file that needs to be transformed.
- Required
[IO.FileInfo]
Path the outputted MST file.
- 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.
$newMsiTransformFile = @{
MsiPath = 'dev\TestMSIs\7z1900-x64.msi'
MstPath = 'dev\test.mst'
Properties = @{
ALLUSERS = 'ValueChanged'
MSIRMSHUTDOWN = 'ValueChanged'
SOMETHINGTOADD = 'ValueAdded'
SOMETHINGELSETOADD = 'ValueAdded'
}
}
New-MsiTransformFile @newMsiTransformFile
- Code adapted from @StuJ's Generating an MSI Transform file from PowerShell.