Msiexec
Provides the means to install, modify, and perform operations on Windows Installer from the command line.
To install or configure a product
Syntax
msiexec
Parameters
/i
Installs or configures a product.
package
Specifies the name of the Windows Installer package file.
ProductCode
Specifies the globally unique identifier (GUID) of the Windows Installer package.
Remarks
Windows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
Examples
To install a product from A:\\Example.msi, type:
msiexec /i A:\\Example.msi
To use the administrative installation option
Syntax
msiexec
Parameters
/a
Applies the administrative installation option.
package
The name of the Windows Installer package file.
Remarks
To repair a product
Windows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
Syntax
msiexec
Parameters
/f
Enables one or more of the command-line options listed in the following table.
Command | Description |
p | Reinstalls only if file is missing. |
o | Reinstalls if file is missing or if an older version is installed. |
e | Reinstalls if file is missing or an equal or older version is installed. |
d | Reinstalls if file is missing or a different version is installed. |
c | Reinstalls if file is missing or the stored checksum does not match the calculated value. |
a | Forces all files to be reinstalled. |
u | Rewrite all required user-specific registry entries. |
m | Rewrites all required computer-specific registry entries. |
s | Overwrites all existing shortcuts. |
v | Runs from source and re-caches the local package. |
package
Name of the Windows Installer package file.
ProductCode
Globally unique identifier (GUID) of the Windows Installer package.
Remarks
This option ignores any property values that you type at the command line.
The default parameter for this command-line option is /fpecms.
Windows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
Examples
To repair the installation package, type:
msiexec /fpecms Example.msi
To uninstall a product
Syntax
msiexec
Parameters
/x
uninstalls a product.
package
Name of the Windows Installer package file.
ProductCode
Globally unique identifier (GUID) of the Windows Installer package.
Remarks
Windows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
Examples
To remove or uninstall a package, type:
msiexec /x Example.msi
To advertise a product
Syntax
msiexec
Parameters
/j
Advertises a product.
u
Advertises to the current user.
m
Advertises to all users of the computer.
package
Specifies the Windows Installer package file.
/g
Identifies the language.
/t
Applies transform to advertised package.
TransformList LanguageIDRemarks
This option ignores any property values that you type at the command line.
If you want to install the application with elevated privileges, use /jm.
Windows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
Examples
To advertise a package to all users of this computer, type:
msiexec /jm Example.msi
To advertise a package to all users of this computer, type:
msiexec /jm Example.msi
To set logging level
Syntax
msiexec
Parameters
/L
Specifies the path to the log file.
i
Logs status messages.
w
Logs nonfatal warnings.
e
Logs all error messages.
a
Logs startup of actions.
r
Logs action-specific records.
u
Logs user requests.
c
Logs initial user interface parameters.
m
Logs out-of-memory.
p
Logs terminal properties.
v
Logs verbose output. To use v, specify /L*v.
+
Appends to existing file.
!
Flushes each line to the log.
*
Logs all information except for the v option. This is a wildcard.
LogFile
Name and path of the text log file.
.txtRemarks
Windows Installer command-line options are not case-sensitive.
To include the v option in a log file using the wildcard flag, type /L*v at the command prompt.
The Windows Installer log file options can also be used with the uninstall and repair processes.
For more information about the Windows Installer command-line options, see Related Topics.
Examples
To install a package and create a log file that contains the information related to the status, out-of-memory, and error messages, type:
msiexec /i Example.msi /Lime logfile.txt
To apply a patch
Syntax
msiexec
Parameters
/p
Applies a patch.
PatchPackage
Specific patch.
Remarks
msiexec
To install a transform using the command line
/p PatchPackage /a Example.msiWindows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
To apply a patch to an administrative installation package, use the following syntax:
Syntax
msiexec /i
Parameters
/i
Installs or configures a product.
package
Specifies the Windows Installer package file.
TRANSFORMS
Property that is used to specify what transform (.mst) files should be applied to the package.
TransformList
List of paths separated by semicolons.
=Remarks
To advertise a product using a transform with the command line
Windows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
Syntax
msiexec /j[u][m]
Parameters
/j
Advertises a product. This option ignores any property values entered on the command line.
u
Advertises to the current user.
m
Advertises to all users of this computer.
package
Name of the Windows Installer package file.
/t
Applies transform to advertised package.
TransformList
List of paths separated by semicolons.
Remarks
To set the user interface level
Windows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
Syntax
msiexec
Parameters
/qn
Displays no user interface.
/qb
Displays a basic user interface.
/qr
Displays a reduced user interface with a modal dialog box displayed at the end of the installation.
/qf
Displays the full user interface with a modal dialog box displayed at the end.
/qn+
Displays no user interface, except for a modal dialog box displayed at the end.
/qb+
Displays a basic user interface with a modal dialog box displayed at the end.
/qb-
Displays a basic user interface with no modal dialog boxes.
Remarks
/qb+-
Windows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
Examples
To display the basic user interface options during the package installation of Example.msi, type:
msiexec /qb Example.msi
To display copyright information for the Windows Installer
Syntax
msiexec
Parameters
{/?|/h}
Displays the Windows Installer version and copyright information.
Remarks
To call the system API DllRegisterServer to self-register modules passed on the command line
Windows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
Syntax
msiexec
Parameters
/y
Calls the system API DllRegisterServer to self-register modules passed on the command line.
module
Specifies the file name of module.
Remarks
This option is used only for registry information that cannot be added using the registry tables of the .msi file.
Windows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
Examples
The following example shows how you can use the msiexec /y command:
msiexec /y my_file.dll
To call the system API DllUnRegisterServer to unregister modules passed on the command line
Syntax
msiexec
Parameters
/z
Calls the system API DllUnRegisterServer to unregister modules passed on the command line.
module
File name of module.
Remarks
This option is used only for registry information that cannot be added using the registry tables of the .msi file.
Windows Installer command-line options are not case-sensitive.
For more information about the Windows Installer command-line options, see Related Topics.
Examples
The following example shows how you can use the msiexec /z command:
msiexec /z my_file.dll
Formatting legend
Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font |
msiexec
msiexec
{u|m} package /g LanguageID {u|m} package /t TransformList /x {package|ProductCode} /f [p][o][e][d][c][a][u][m][s][v]{package|ProductCode} /a package /i {package|ProductCode}