MsiExec.exe command-line optionsΒΆ
MsiExec.exe is used to install/repair/uninstall MSI packages from the command line.
Note
Command-line options are case-insensitive.
Syntax:
msiexec <install option> "package"/{ProductCode} [optional parameters]
Usage:
msiexec /i "C:\package.msi" /qb
msiexec /i "C:\package.msi" /l*v "C:\package_install.log" /qb
msiexec /i "C:\package.msi" TRANSFORMS="C:\transform.mst" /qb
msiexec /i "C:\package.msi" PATCH="C:\patch1.msp;C:\PKG\patch2.msp" /qb
msiexec /a "C:\package.msi" TARGETDIR="C:\admin_install" /qb
msiexec /p "C:\patch1.msp;C:\patch2.msp" /qb
msiexec /f {FC1EBBED-AFE1-4760-96B0-623F5AC7070C} /qn
msiexec /x {FC1EBBED-AFE1-4760-96B0-623F5AC7070C} /qn
Install options (required)
Option |
Description |
---|---|
|
Install or configure a product. After this option must follow either Example:
|
|
Install a product on the network. Administrative installation option. After this option must follow Example 1:
msiexec /a "C:\package.msi" Example 2:
msiexec /a "C:\package.msi"
TARGETDIR="C:\admin_install" |
|
Repair a product. After this option must follow either Note This option ignores any property values entered on the command line. This option can be supplemented with the additional
flags, entered without spaces. If no flags are
specified, the default is
Example 1:
msiexec /f {FC1EBBED-AFE1-4760-96B0-623F5AC7070C} Example 2:
msiexec /famus
{FC1EBBED-AFE1-4760-96B0-623F5AC7070C} |
|
Uninstall a product. After this option must follow either Example: |
|
Advertise a product. After this option must follow Note This option ignores any property values entered on the command line. This option must be supplemented with the additional flag, entered without spaces.
Example: |
|
Apply a patch to the installed product. After this option must follow To apply a patch to an installed administrative image you
must combine the following options: Example: |
Warning
The install option is mandatory. Only one install option should be
used. The one exception to this rule is that patching an
administrative installation
requires using both /p
and /a
.
Display options (optional)
Option |
Description |
---|---|
|
Sets user interface level. For more information, see UI levels description. This option can be supplemented with the additional
flags, entered without spaces. If no flags are
specified, the default is
Example: |
Logging options (optional)
Option |
Description |
---|---|
|
Writes logging information into a logfile at the specified existing path. The path to the logfile location must already exist. The installer does not create the directory structure for the logfile. This option can be supplemented with the additional
flags, entered without spaces. If no flags are
specified, the default is
Note For more information about all the methods that are available for setting the logging mode, see Normal Logging in the Windows Installer Logging section. Example: |
Restart options (optional)
The restart options are control setting the MSI PUBLIC properies
PROPERTY=Value
.
Property |
Value |
---|---|
|
Never restart option The installer never restarts the computer after the installation. Example: |
|
Always restart option. The installer always restarts the computer after every installation. Example: |
|
Do not prompt before restarting option. Setting this property does not initiate a reboot if one is not needed, it only suppresses the display of any prompts for reboots to the user. Example: |
|
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 Example: |
Note
Only PUBLIC PROPERTIES can be modified using the command line. All property names on the command line are interpreted as uppercase but the value retains case sensitivity. If you enter MyProperty at a command line, the installer overrides the value of MYPROPERTY and not the value of MyProperty in the Property table.
For more information, see Windows Installer Command-Line Options at docs.microsoft.com.
Note
PACE Suite covers the whole range of application packaging tasks - learn more.
Try PACE Suite for free - 21 days no obligations unlimited trial with all functions unlocked.