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
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
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.
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.
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
/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.