6

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

wzzrd
  • 10,269
  • 2
  • 32
  • 47
JoshRivers
  • 245
  • 1
  • 4
  • 10
  • Not all MSIs will allow silent installation, I don't think. – Eddie Jun 23 '09 at 02:23
  • Find a full list of Command Line options here: http://msdn.microsoft.com/en-us/library/aa367988.aspx – Qwerty Jun 23 '09 at 02:31
  • @Eddie: all real MSI files can be installed in silent mode by design, but it is indeed possible for vendors to mess this up by putting non-standard constructs into the MSI (custom actions). – Stein Åsmul Sep 19 '09 at 17:11

4 Answers4

8

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
  • 4,958
  • 8
  • 29
  • 42
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,566
  • 4
  • 25
  • 38
  • are the links dead? (off: command line builder gui wizard, what an idea) – n611x007 Apr 23 '15 at 15:14
  • 1
    I am sad to say this great tool appears to no longer be available for download from Wise since the overall Wise product has been taken off market. I am considering rewriting a similar tool myself. – Stein Åsmul Apr 23 '15 at 22:07
  • Resurrected the tool for download from Wayback machine. Assume this is legal since the tool was freeware. – Stein Åsmul Jun 25 '18 at 20:10
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,466
  • 19
  • 26
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
  • 1
  • 10
  • 17