Command-line options

The Windows Installer command-line syntax includes the following options:

OptionParametersDefinition

/i

{package|ProductCode}

Installs or configures a product.

For example, to install a product from A:\Example.msi, use the following command:
msiexec /i A:\Example.msi

For more information, see To install a package using the command line

For information about installing transforms using the command line, see To install a transform using using the command line and To install and advertise a product with the command line

/a

package

Administrative installation option.

For more information, see To create an administrative installation package from the command line

/f

[p][o][e][d][c][a][u][m][s][v]

{package|ProductCode}

Repairs a product. This option ignores any property values entered on the command line.

p - Reinstall only if file is missing.

o - Reinstall if file is missing or if an older version is installed.

e - Reinstall if file is missing or an equal or older version is installed.

d - Reinstall if file is missing or a different version is installed.

c - Reinstall if file is missing or the stored checksum does not match the calculated value.

a - Force all files to be reinstalled.

u - Rewrite all required user-specific registry entries.

m - Rewrite all required computer-specific registry entries.

s - Overwrite all existing shortcuts.

v - Run from source and re-cache the local package.

For example, you can repair the installation package using the following command:
msiexec /fpecms Example.msi

For more information, see To repair a package using the command line

/x

{package|ProductCode}

x - Uninstalls a product.

For example, you can remove or uninstall a package using the following command:
msiexec /x Example.msi

For more information, see To remove a package using the command line

/j

[u|m]package 

[u|m]package /t transform list

[u|m]package /g LanguageID

Advertises a product. This option ignores any property values entered on the command line.

u - Advertise to the current user.

m - Advertise to all users of the computer.

g - Language identifier.

t - Apply transform to advertised package.

For example, you can advertise a package to all users of this computer using the following command:
msiexec /jm Example.msi

For more information, see To advertise a package using the command line and To install and advertise a product with the command line

/L

[i][w][e][a][r][u][c][m][p][v][+][!]logfile

Specifies the path to the log file. The following flags indicate which information to log:

i - Status messages

w - Nonfatal warnings

e - All error messages

a - Startup of actions

r - Action-specific records

u - User requests

c - Initial user interface parameters

m - Out-of-memory

p - Terminal properties

v - Verbose output

+ - Append to existing file

! - Flush each line to the log

* - Wildcard; log all information except for the v option.

To include the v option, specify /L*v.

For example, to install a package and create a log file that contains the information related to the status, out-of-memory, and error messages, use the following command:
msiexec /i Example.msi /Lime logfile.txt

For more information, see To create an installation log file using the command line

/p

PatchPackage

Applies a patch. To apply a patch to an installed administrative image you must combine options as follows:

/p - PatchPackage

/a - package

For example, to apply a patch to an administrative installation package, use the following syntax:
msiexec /p <PatchPackage> /a Example.msi 

/q

{n|b|r|f}

Sets user interface level.

qn - No user interface.

qb - Basic user interface.

qr - Reduced user interface with a modal dialog box displayed at the end of the installation.

qf - Full user interface with a modal dialog box displayed at the end.

qn+ - No user interface except for a modal dialog box displayed at the end.

qb+ - Basic user interface with a modal dialog box displayed at the end.

qb- - Basic user interface with no modal dialog boxes.

 Note

The modal box is not displayed if the user cancels the installation.

For example, to display the basic user interface options during the package installation, use the following command:
msiexec /qb Example.msi

/? or /h

none

Displays copyright information for the Windows Installer.

? or h - Displays the Windows Installer version and copyright information.

For example, to display the version and copyright information, use the following command:
msiexec /?

/y

module

y - Calls the system API DllRegisterServer to self-register modules passed on the command line. For example:
msiexec /y my_file.dll.

This option is used only for registry information that cannot be added using the registry tables of the .msi file.

/z

module

z - Calls the system API DllUnRegisterServer to unregister modules passed on the command line. For example:
msiexec /z my_file.dll.

This option is used only for registry information that cannot be removed using the registry tables of the .msi file.



© 2016 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies