Get MSI Package Parameters for Silent Installation

PowerADM.com / Windows / Get MSI Package Parameters for Silent Installation

If you are installing the MSI package in silent mode (using the /qn switch), you can set additional application installation options on the command line. Developers can add additional (hidden) installation options to MSI packages that are only configured in the GUI when the application is installed. This article shows you how to get all the command line installation options available for an MSI package on Windows.

The Windows Installer allows you to write all installation actions on MSI packages to a text log file using the /lp! option.

For example, to save all of the PowerShell Core MSI installer settings to a text file, open a cmd.exe or PowerShell and run the command:

.\PowerShell-7.3.3-win-x64.msi /lp! msisettings.txt

msi package - log installation settings

In the MSI package graphical installer, select and configure the options you want, click Next, start the installation, and then interrupt the installation by clicking Cancel.

cancel msi installation

A text log file msisettings.txt will appear in the current directory. It contains a list of the options you selected when installing the MSI package. msi package available install options

Now that you have the names of the installation options, you can use them to install the MSI package in silent mode with the settings you want. For example:

msiexec.exe /package PowerShell-7.3.2-win-x64.msi /qb-! ENABLE_PSREMOTING = 0 ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=0 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=0
The /qb-! option hides the Cancel button and disables the ability to cancel the installation.

If an application is distributed in the form of an executable EXE file rather than an MSI, you can try opening the EXE file using the 7-Zip archiver (select File -> 7ZIP –> Open Archive). Extract installation MSI and MST files from the EXE file.

7zip - extract msi from exe

You can also open an MSI file using the ORCA tool (which is a part of the Windows Installer SDK). Under Properties, Checkboxes, etc. you can view the available MSI package command line options.

orca - view msi file install properties

Leave a Reply

Your email address will not be published. Required fields are marked *