Optional command-line settings

The following table shows the optional settings available for the msiexec.exe MSI installer. Type the optional settings on the command line after msiexec.exe with a space between each setting.

NOTE: See support.microsoft.com for details about all the command-line switches for the Windows Installer Tools.
Table 1. Command-Line Settings for MSI Installer
Setting Result
/i <Package|Product Code> This command installs or configures a product. /i SysMgmtx64.msi – Installs the Server Administrator software.
/i <SysMgmt or SysMgmtx64>.msi /qn This command carries out a fresh installation.
/x <Package|Product Code> This command uninstalls a product. /x SysMgmtx64.msi – Uninstalls the Server Administrator software. For the product GUID, see Unattended Uninstall Using The Product GUID.
/q[n|b|r|f] This command sets the user interface (UI) level.
  • /q or /qn – no UI. This option is used for silent and unattended installation.
  • /qb – basic UI. This option is used for unattended but not silent installation.
  • /qr – reduced UI. This option is used for unattended installation while displaying a modal dialog box showing install progress.
  • /qf – full UI. This option is used for standard attended installation.
/f[p|o|e|d|c|a|u |m|s|v]<Package| ProductCode> This command repairs a product.
  • /fp – The option reinstalls a product when a file is missing.
  • /fo – The option reinstalls a product when a file is missing or if an older version of a file is installed.
  • /fe – The option reinstalls a product when a file is missing or an equal or older version of a file is installed.
  • /fd – The option reinstalls a product when a file is missing or a different version of a file is installed.
  • /fc – The option reinstalls a product when a file is missing or the stored checksum value does not match the calculated value.
  • /fa – The option forces all files to be reinstalled.
  • /fu – The option rewrites all required user-specific registry entries.
  • /fm – The option rewrites all required system-specific registry entries.
  • /fs – The option overwrites all existing shortcuts.
  • /fv – The option runs from the source and recaches the local package. Do not use this reinstall option for the first installation of an application or feature.
INSTALLDIR=<path> This command installs a product in a specific location. When you specify an install directory with this switch, it must be created manually before running the CLI install commands or they fail without displaying an error message. / i SysMgmtx64.msi INSTALLDIR=c:\OpenManage /qn – installs a product to a specific location where c:\OpenManage is the install location.
CP_MESSAGE_FORMAT=<enhanced | traditional> This command sets the alert message type to Enhanced Message Format (recommended) or Traditional Message Format.

For example, running msiexec.exe /i SysMgmtx64.msi /qn installs Server Administrator features on each remote system that is based on the hardware configuration of the system. This installation is done silently and unattended.