8

What is the command line to silently install an MSI file?

wzzrd
  • 10,589

4 Answers4

9

Standard Installer Command-Line Options

/quiet

Quiet display option.

The installer runs an installation without displaying a user interface.

Examples:

msiexec /package Application.msi /quiet
msiexec /uninstall Application.msi /quiet
msiexec /update msipatch.msp /quiet
msiexec /uninstall msipatch.msp /package Application.msi / quiet

Note The equivalent Windows Installer Command-Line Option is /qn.

msiexec

run this command to find more information about the installation options.

Jindrich
  • 5,019
6

UPDATE June 2018: Although the tool shown below is no longer available for download, I found it via Wayback machine. I assume it is OK and legal to link to it, seeing as the tool was freeware. Updated links below.

UPDATE: This tool from Wise is regrettably not downloadable anymore. I am not sure if it is OK to distribute it either. It seemed to be a free tool distributed as part of their main Wise Package Studio suite, but I don't think it is open source. I wish they would release it as an open source tool.

The Wise packaging products have been discontinued due to a number of legal issues.


You got some good answers here already, but I just want to add the "quick and easy" way : use the "command line builder tool" from Altiris (direct download).

UPDATE June 2018: http://www2.wise.com/filelib/WICLB.exe - broken link resurrected from Wayback machine. Seeing as the tool was freeware I assume that is legal. Please run the download by virustotal.com for safety.

I am very experienced with msiexec.exe, but the command lines are so long that it is easy to make mistakes. I prefer to generate the complex ones and eliminate that error source.

N.B: hope posting download links to tools is ok! I am not affiliated with Altiris in any way. It's a free tool, it's easy to use and it works. Here is a screenshot:

enter image description here

Stein Åsmul
  • 2,791
4

See the docs for "Unattended": http://unattended.sourceforge.net/installers.php

In short, while there are ways to cause them to fail, these flags should work:

 msiexec /qb /i blah.msi REBOOT=ReallySuppress
LapTop006
  • 6,526
3

There's also these:

/q , /qn  No UI.
/qb       Basic UI.
/qb!      Basic UI with no cancel button.
/qr       Reduced UI. A modal dialog box is displayed at the end of the install.
/qf       Full UI. A modal dialog box is displayed at the end of the install.
/qn+      No UI. However, a modal dialog box is displayed at the end of the installation.
/qb+      Basic UI. A modal dialog box is displayed at the end of the installation. If you         cancel the installation, a modal dialog box is not displayed.
/qb-      Basic UI with no modal dialog boxes.

source: http://www.ss64.com/nt/msiexec.html

mrTomahawk
  • 1,119