Skip to content

This modules consists of several functions for handling MSI files.

License

Notifications You must be signed in to change notification settings

UNT-CAS/MsiHandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status codecov version downloads

This modules consists of several functions for handling MSI files.

Quick Start

Install-Module MsiHandler
Import-Module MsiHandler

Available Functions

Get-MsiFileInfo

This function will read the properties out of an MSI file without locking the specified file. The MSI file's [IO.FileInfo] is returned as the .IO.FileInfo property. Here's the default usage:

Get-MsiFileInfo -Path 'C:\Temp\SurfaceBook_Win10_15063_1802100_0.msi'

Output:

.IO.FileInfo    : C:\Temp\SurfaceBook_Win10_15063_1802100_0.msi
Manufacturer    : Microsoft
ProductCode     : {1CD69D1F-0C2D-46A0-89A9-F29582DC718F}
ProductLanguage : 1033
ProductName     : SurfaceBook Update 18_021_00 (64 bit)
ProductVersion  : 18.021.18206.0

Full usage documentations available in the wiki.

New-MsiTransformFile

Create an MST file on the fly.

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

New-MsiTransformFile @newMsiTransformFile

Output:

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        2/28/2019   3:46 AM          20480 test.mst

Full usage documentations available in the wiki.