Standard Installer Command-Line Options
The executable program that interprets packages and installs products is Msiexec.exe.
Msiexec also sets an error level on return that corresponds to System Error Codes.
The following table identifies the standard command-line options for this program. Command-line options are case insensitive.
Windows Installer 2.0: The command-line options that are identified in this topic are available beginning with Windows Installer 3.0. The Windows Installer Command-Line Options are available with Windows InstallerВ 3.0 and earlier versions.
Option | Parameters | Meaning | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
/help | В | Help and quick reference option. Displays the correct usage of the setup command including a list of all switches and behavior. The description of usage can be displayed in the user interface. Incorrect use of any option invokes this help option. Example: msiexec /help
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/quiet | В | Quiet display option. The installer runs an installation without displaying a user interface. No prompts, messages, or dialog boxes are displayed to the user. The user cannot cancel the installation. Use the /norestart or /forcerestart standard command-line options to control reboots. If no reboot options are specified, the installer restarts the computer whenever necessary without displaying any prompt or warning to the user. Examples: msiexec /package Application.msi /quiet Msiexec /uninstall Application.msi /quiet Msiexec /update msipatch.msp /quiet Msiexec /uninstall msipatch.msp /package Application.msi / quiet
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/passive | В | Passive display option. The installer displays a progress bar to the user that indicates that an installation is in progress but no prompts or error messages are displayed to the user. The user cannot cancel the installation. Use the /norestart or /forcerestart standard command-line options to control reboots. If no reboot option is specified, the installer restarts the computer whenever necessary without displaying any prompt or warning to the user. Example: msiexec /package Application.msi /passive
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/norestart | В | Never restart option. The installer never restarts the computer after the installation. Example: msiexec /package Application.msi /norestart
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/forcerestart | В | Always restart option. The installer always restarts the computer after every installation. Example: msiexec /package Application.msi /forcerestart
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/promptrestart | В | 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 /quiet option.
Command-Line OptionsThe executable program that interprets packages and installs products is Msiexec.exe. Note that Msiexec also sets an error level on return that corresponds to system error codes. Command-line options are case-insensitive. The command-line options in the following table are available with Windows Installer 3.0 and earlier versions. The Standard Installer Command-Line Options are also available beginning with Windows Installer 3.0.
The options /i, /x, /f[p|o|e|d|c|a|u|m|s|v], /j[u|m], /a, /p, /y and /z should not be used together. The one exception to this rule is that patching an administrative installation requires using both /p and /a. The options /t, /c and /g should only be used with /j. The options /l and /q can be used with /i, /x, /f[p|o|e|d|c|a|u|m|s|v], /j[u|m], /a, and /p. The option /n can be used with /i, /f, /x and /p. To install a product from A:\Example.msi, install the product as follows: msiexec /i A:\Example.msi 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 About Properties. To install a product with PROPERTY set to VALUE, use the following syntax on the command line. You can put the property anywhere except between an option and its argument. msiexec /i A:\Example.msi PROPERTY=VALUE msiexec /i PROPERTY=VALUE A:\Example.msi Property values that are literal strings must be enclosed in quotation marks. Include any white spaces in the string between the marks. msiexec /i A:\Example.msi PROPERTY=»Embedded White Space» To clear a public property by using the command line, set its value to an empty string. msiexec /i A:\Example.msi PROPERTY=»» For sections of text set apart by literal quotation marks, enclose the section with a second pair of quotation marks. msiexec /i A:\Example.msi PROPERTY=»Embedded «»Quotes»» White Space» The following example shows a complicated command line. msiexec /i testdb.msi INSTALLLEVEL=3 /l* msi.log COMPANYNAME=»Acme «»Widgets»» and «»Gizmos.»»» The following example shows advertisement options. Note that switches are not case-sensitive. msiexec /JM msisample.msi /T transform.mst /LIME logfile.txt The following example shows you how to install a new instance of a product to be advertised. This product is authored to support multiple instance transforms. msiexec /JM msisample.msi /T :instance1.mst;customization.mst /c /LIME logfile.txt The following example shows how to patch an instance of a product that is installed using multiple instance transforms. msiexec /p msipatch.msp;msipatch2.msp /n <00000001-0002-0000-0000-624474736554>/qb When you apply patches to a specific product, the /i and /p options cannot be specified together in a command line. In this case, you can apply patches to a product as follows. msiexec /i A:\Example.msi PATCH=msipatch.msp;msipatch2.msp /qb The PATCH property cannot be set in a command line, when /p option is used. If the PATCH property is set when the /p option is used, the value of PATCH property is ignored and overwritten. Windows installer command line argumentsСообщения: 132
——-
Последний раз редактировалось Котяра, 23-05-2008 в 21:34 . Причина: опечатки
Это сообщение посчитали полезным следующие участники:
Для этого нужно использовать свойство TRANSFORMS и указывать путь к файлу преобразования. Например, ——- Это сообщение посчитали полезным следующие участники: |