Standard Installer Command-Line Options

The executable program that interprets packages and installs products is Msiexec.exe.

Note

Msiexec also sets an error level on return that corresponds to System Error Codes.

 

The following table identifies the standard command-line options for this program. Command-line options are case insensitive.

Windows Installer 2.0: The command-line options that are identified in this topic are available beginning with Windows Installer 3.0. The Windows Installer Command-Line Options are available with Windows Installer 3.0 and earlier versions.

Option Parameters Meaning
/help   Help and quick reference option. Displays the correct usage of the setup command including a list of all switches and behavior. The description of usage can be displayed in the user interface. Incorrect use of any option invokes this help option.
Example: msiexec /help
[!Note]
The equivalent Windows Installer [Command-Line Option](command-line-options.md) is /?.

/quiet   Quiet display option. The installer runs an installation without displaying a user interface. No prompts, messages, or dialog boxes are displayed to the user. The user cannot cancel the installation. Use the /norestart or /forcerestart standard command-line options to control reboots. If no reboot options are specified, the installer restarts the computer whenever necessary without displaying any prompt or warning to the user.
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](command-line-options.md) is /qn.

/passive   Passive display option. The installer displays a progress bar to the user that indicates that an installation is in progress but no prompts or error messages are displayed to the user. The user cannot cancel the installation. Use the /norestart or /forcerestart standard command-line options to control reboots. If no reboot option is specified, the installer restarts the computer whenever necessary without displaying any prompt or warning to the user.
Example: msiexec /package Application.msi /passive
[!Note]
The equivalent Windows Installer [Command-Line Option](command-line-options.md) is /qb!- with [REBOOTPROMPT](rebootprompt.md)=S set on the command line.

/norestart   Never restart option. The installer never restarts the computer after the installation.
Example: msiexec /package Application.msi /norestart
[!Note]
The equivalent Windows Installer command line has [REBOOT](reboot.md)=ReallySuppress set on the command line.

/forcerestart   Always restart option. The installer always restarts the computer after every installation.
Example: msiexec /package Application.msi /forcerestart
[!Note]
The equivalent Windows Installer command line has [REBOOT](reboot.md)=Force set on the command line.

/promptrestart   Prompt before restarting option. Displays a message that a restart is required to complete the installation and asks the user whether to restart the system now. This option cannot be used together with the /quiet option.
[!Note]
The equivalent Windows Installer command line has [REBOOTPROMPT](rebootprompt.md) = "" set on the command line.

/uninstall Uninstall product option. Uninstalls a product.
[!Note]
The equivalent Windows Installer [Command-Line Option](command-line-options.md) is /x.

/uninstall /package /uninstall [;Update2.msp | PatchGUID2] Uninstall update option. Uninstalls an update patch.
[!Note]
The equivalent Windows Installer [Command-Line Option](command-line-options.md) is /I with [MSIPATCHREMOVE](msipatchremove.md)=Update1.msp | PatchGUID1[;Update2.msp | PatchGUID2] set on the command line.

/log Log option. Writes logging information into a log file at the specified existing path. The path to the log file location must already exist. The installer does not create the directory structure for the logfile.
The following information is entered into the log:
  • Status messages
  • Nonfatal warnings
  • All error messages
  • Start up of actions
  • Action-specific records
  • User requests
  • Initial UI parameters
  • Out-of-memory or fatal exit information
  • Out-of-disk-space messages
  • Terminal properties
[!Note]
The equivalent Windows Installer [Command-Line Option](command-line-options.md) is /L*.

[!Note]
For more information about all the methods that are available for setting the logging mode, see [Normal Logging](normal-logging.md) in the [Windows Installer Logging](windows-installer-logging.md) section.

/package Install product option. Installs or configures a product.
[!Note]
The equivalent Windows Installer [Command-Line Option](command-line-options.md) is /I.

/update [;Update2.msp] Install patches option. Installs one or multiple patches.
[!Note]
The equivalent Windows Installer command line has [PATCH](patch.md) = [msipatch.msp]<;patchguid2> set on the command line.