[This is preliminary documentation and subject to change.]
The executable program that interprets packages and installs products is Msiexec.exe. The following table describes the command-line options for this program.
Option | Parameters | Meaning |
---|---|---|
/i | Package|ProductCode | Installs or configures a product. |
/o | Property1=Value1 Property2=Value2. . . | Sets properties. This parameter is used in conjunction with /i, /f, or /n. The /o parameter can be used with /i only if you specify the package code. |
/f | [ReinstallModes] Package|ProductCode | Repairs a product. |
/n | Package | Installs an product on the network. |
/x | Package|ProductCode | Uninstalls an product. |
/a | [u|m]Package | Advertises an product. The flag 'u' advertises to the current user, while 'm' advertises to all users of the machine. |
/l | [logmode]Logfile | Specifies the logfile. |
/t | ProductCode | Uninstalls an product. |
/q | n|b|r|f | Specifies the level of user interface to display; can be No, Basic, Reduced, or Full display. |
/? or /h | Displays online Help. |
For example, to install a product from A:\Example.msi and create a logfile using the LOGFILE property and the LOGMODE property, install the product as follows:
msiexec /i A:\Example.msi /o "LOGFILE=c:\Example.log LOGMODE=raidcupmew"
The command line for Msiexec.exe supports spaces in property values. Use single quotes (`) to delimit the values. If you want to pass a single quote in an option, escape it with a backslash (\). For example:
msiexec /p"testdb.msi" /o"SOURCEDIR=`C:\X Y\Z`"