App Packaging PowerShell Functions

I’ve recently been working on a lot of app packaging, and I decided to take the opportunity to update my scripts. In this post I’ll cover 3 PowerShell functions that I found to be the most useful. The functions can be found on my GitHub. Invoke-MsiExec This function works with msiexec.exe. The function allows for installing or uninstalling a .msi based application. The function has a number of parameters: FilePath - The path to the .msi or .msp file Guid - The GUID of the MSI-based application to be uninstalled Install - Indicates that the /i switch should be used when calling msiexec.exe Uninstall - Indicates that the /x switch should be used when calling msiexec.exe Patch - Indicates that the /p switch should be used when calling msiexec.exe Arguments - A comma separated list of arguments to pass to msiexec.exe ExitCodes - A comma separated list of non-standard exit codes Some notes about the parameters: ...

January 30, 2020 · 3 min