windows Installer(msiexec.exe)命令行选项
来源:互联网 发布:德国舒尔茨金钻js防水 编辑:程序博客网 时间:2024/05/20 04:11
Msiexec.exe用来解释和安装windows下的安装程序(*.msi) 。以下适用与3.0以后的版本。
一 Msiexec.exe的标准命令行参数,区分大小写。
Help and quick reference option. Displays the correct usage of thesetup command including a list of all switches and behavior. Thedescription of usage can be displayed in the user interface. Incorrectuse of any option invokes this help option.
Example: msiexec /help
Note The equivalent Windows Installer Command-Line Option is /?.
/quietQuiet 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 /forcerestartstandard command-line options to control reboots. If no reboot optionsare specified, the installer restarts the computer whenever necessarywithout 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
Note The equivalent Windows Installer Command-Line Option is /qn.
/passivePassive display option. The installer displays a progress bar to theuser that indicates that an installation is in progress but no promptsor error messages are displayed to the user.The user cannot cancel the installation. Use the /norestart, /forcerestart, or /promptrestartstandard command-line options to control reboots. If no reboot optionis specified, the installer restarts the computer whenever necessarywithout displaying any prompt or warning to the user.
Example: msiexec /package Application.msi /passive
Note The equivalent Windows Installer Command-Line Option is /qb! with REBOOTPROMPT=S set on the command line.
/norestartNever restart option. The installer never restarts the computer after the installation.
Example: msiexec /package Application.msi /norestart
Note The equivalent Windows Installer command line has REBOOT=ReallySuppress set on the command line.
/forcerestartAlways restart option. The installer always restarts the computer after every installation.
Example: msiexec /package Application.msi /forcerestart
Note The equivalent Windows Installer command line has REBOOT=Force set on the command line.
/promptrestartPrompt before restarting option. Displays a message that a restartis required to complete the installation and asks the user whether torestart the system now. This option cannot be used together with the /quiet option.
Note The equivalent Windows Installer command line has REBOOTPROMPT = "" set on the command line.
/uninstall<Package.msi|ProductCode>Uninstall product option. Uninstalls a product.
Note The equivalent Windows Installer Command-Line Option is /x.
/uninstall/package <Package.msi | ProductCode> /uninstall <Update1.msp | PatchGUID1>[;Update2.msp | PatchGUID2]Uninstall update option. Uninstalls an update patch.
Note The equivalent Windows Installer Command-Line Option is /I with MSIPATCHREMOVE=Update1.msp | PatchGUID1[;Update2.msp | PatchGUID2] set on the command line.
/log<logfile>Log option. Writes logging information into a log file at thespecified existing path. The path to the log file location must alreadyexist. The installer does not create the directory structure for thelogfile.
The following information is entered into the log:
- Status messages
- Nonfatal warnings
- All error messages
- Start up of actions
- Action-specific records
- User requests
- Initial UI parameters
- Out-of-memory or fatal exit information
- Out-of-disk-space messages
- Terminal properties
Note The equivalent Windows Installer Command-Line Option is /L*.
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.
/package<Package.msi|ProductCode>Install product option. Installs or configures a product.
Note The equivalent Windows Installer Command-Line Option is /I.
/update<Update1.msp>[;Update2.msp]Install patches option. Installs one or multiple patches.
Note The equivalent Windows Installer command line has PATCH = [msipatch.msp]<;PatchGuid2> set on the command line.
二 Msiexec.exe的一般命令行参数,区分大小写,部分与标准命令行参数等价。
Installs or configures a product.
/f[p|o|e|d|c|a|u|m|s|v] Package|ProductCodeRepairs a product. This option ignores any property values enteredon the command line. The default argument list for this option is'omus.' This option shares the same argument list as the REINSTALLMODE property.
p - Reinstalls only if file is missing.
o - Reinstalls if file is missing or 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. Only repairs files that have msidbFileAttributesChecksum in the Attributes column of the File table.
a - Forces all files to be reinstalled.
u - Rewrites 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. Do not use the v reinstall option for the first installation of an application or feature.
/aPackageAdministrative installation option. Installs a product on the network.
/xPackage|ProductCodeUninstalls a product./j[u|m]Packageor
[u|m]Package/tTransform List
or
[u|m]Package/gLanguageID
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 machine.
g - Language identifier.
t - Applies transform to advertised package.
/L[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] LogfileWrites logging information into a logfile at the specified existingpath. The path to the logfile location must already exist. Theinstaller does not create the directory structure for the logfile.Flags indicate which information to log. If no flags are specified, thedefault is 'iwearmo.'
i - Status messages.
w - Nonfatal warnings.
e - All error messages.
a - Start up of actions.
r - Action-specific records.
u - User requests.
c - Initial UI parameters.
m - Out-of-memory or fatal exit information.
o - Out-of-disk-space messages.
p - Terminal properties.
v - Verbose output.
x - Extra debugging information.
Windows Installer 2.0: Not supported. The x option is available with Windows Installer version 3.0.3790.2180 and later.
+ - Append to existing file.
! - Flush each line to the log.
"*" - Wildcard, log all information except for the v and x options. To include the v and x options, specify "/l*vx".
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
/mfilenameNote The length of filename must be no more than eight characters.
Generates an SMS status .mif file. Must be used with either theinstall (-i), remove (-x), administrative installation (-a), orreinstall (-f) options. The ISMIF32.DLL is installed as part of SMS andmust be on the path.
The fields of the status mif file are filled with the following information:
Manufacturer - Author
Product - Revision Number
Version - Subject
Locale - Template
Serial Number - not set
Installation - set by ISMIF32.DLL to "DateTime"
InstallStatus - "Success" or "Failed"
Description - Error messages in the following order: 1) Errormessages generated by installer. 2) Resource from Msi.dll ifinstallation could not commence or user exit. 3) System error messagefile. 4) Formatted message: "Installer error %i", where %i is errorreturned from Msi.dll.
/pPatchPackage[;patchPackage2…]Applies a patch. To apply a patch to an installed administrative image you must combine the following options:
/p <PatchPackage>[;patchPackage2…] /a <Package>
/qn|b|r|fSets user interface level.
q , qn - No UI
qb - Basic UI. Use qb! to hide the Cancel button.
qr - Reduced UI with no modal dialog box displayed at the end of the installation.
qf - Full UI and any authored FatalError, UserExit, or Exit modal dialog boxes at the end.
qn+ - No UI except for a modal dialog box displayed at the end.
qb+ - Basic UI with a modal dialog box displayed at the end. Themodal box is not displayed if the user cancels the installation. Useqb+! or qb!+ to hide the Cancel button.
qb- - Basic UI with no modal dialog boxes. Please note that /qb+- is not a supported UI level. Use qb-! or qb!- to hide the Cancel button.
Note that the ! option is available with Windows Installer 2.0 and works only with basic UI. It is not valid with full UI.
/? or /hDisplays copyright information for Windows Installer.
/ymoduleCalls the system function DllRegisterServerto self-register modules passed in on the command line. Specify thefull path to the DLL. For example, for MY_FILE.DLL in the currentfolder you can use:
msiexec /y .\MY_FILE.DLL
This option is only used for registry information that cannot be added using the registry tables of the .msi file.
/zmoduleCalls the system function DllUnRegisterServerto unregister modules passed in on the command line. Specify the fullpath to the DLL. For example, for MY_FILE.DLL in the current folder youcan use:
msiexec /z .\MY_FILE.DLL
This option is only used for registry information that cannot be removed using the registry tables of the .msi file.
/cAdvertises a new instance of the product. Must be used inconjunction with /t. Available starting with the Windows Installerversion that is shipped with Windows Server 2003 and Windows XP withService Pack 1 (SP1).
/nProductCodeSpecifies a particular instance of the product. Used to identify aninstance installed using the multiple instance support through aproduct code changing transforms. Available starting with the WindowsInstaller version shipped with Windows Server 2003 and Windows XP withSP1.
三 Msiexec.exe 4.5的帮助。可以运行 msiexec.exe /help来查看。
Windows ® Installer. V 4.5.6001.22159
msiexec /Option <Required Parameter> [Optional Parameter]
Install Options
</package | /i> <Product.msi>
Installs or configures a product
/a <Product.msi>
Administrative install - Installs a product on the network
/j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]
Advertises a product - m to all users, u to current user
</uninstall | /x> <Product.msi | ProductCode>
Uninstalls the product
Display Options
/quiet
Quiet mode, no user interaction
/passive
Unattended mode - progress bar only
/q[n|b|r|f]
Sets user interface level
n - No UI
b - Basic UI
r - Reduced UI
f - Full UI (default)
/help
Help information
Restart Options
/norestart
Do not restart after the installation is complete
/promptrestart
Prompts the user for restart if necessary
/forcerestart
Always restart the computer after installation
Logging Options
/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
i - Status messages
w - Nonfatal warnings
e - All error messages
a - Start up of actions
r - Action-specific records
u - User requests
c - Initial UI parameters
m - Out-of-memory or fatal exit information
o - Out-of-disk-space messages
p - Terminal properties
v - Verbose output
x - Extra debugging information
+ - Append to existing log file
! - Flush each line to the log
* - Log all information, except for v and x options
/log <LogFile>
Equivalent of /l* <LogFile>
Update Options
/update <Update1.msp>[;Update2.msp]
Applies update(s)
/uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>
Remove update(s) for a product
Repair Options
/f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
Repairs a product
p - only if file is missing
o - if file is missing or an older version is installed (default)
e - if file is missing or an equal or older version is installed
d - if file is missing or a different version is installed
c - if file is missing or checksum does not match the calculated value
a - forces all files to be reinstalled
u - all required user-specific registry entries (default)
m - all required computer-specific registry entries (default)
s - all existing shortcuts (default)
v - runs from source and recaches local package
Setting Public Properties
[PROPERTY=PropertyValue]
Consult the Windows ® Installer SDK for additional documentation on the
command line syntax.
Copyright © Microsoft Corporation. All rights reserved.
Portions of this software are based in part on the work of the Independent JPEG Group.
四 参考:
1) http://msdn.microsoft.com/en-us/library/aa372866.aspx
2) http://blogs.msdn.com/windows_installer_team/default.aspx
Windows Installer 2.0:http://msdn.microsoft.com/en-us/library/aa372024(VS.85).aspx
Windows Installer 3.0:http://msdn.microsoft.com/en-us/library/aa367988(VS.85).aspx
五 完!
- windows Installer(msiexec.exe)命令行选项
- Msiexec.exe 的命令行选项
- Msiexec(命令行选项)
- Msiexec(命令行选项)
- msiexec Msi文件在命令行安装的命令帮助内容 来自微软帮助Windows (R) Installer
- msiexec.exe
- 解决Windows Installer错误的方法:msiexec /unregserver
- MSTest.exe 命令行选项
- 用于 Windows XP 的 Explorer.exe 命令行选项
- msiexec.exe 参数介绍
- Introduction to Msiexec.exe
- msiexec.exe 进程
- C#命令行(CSC.EXE) 编译器选项
- Windows 版本服务命令行选项
- MyEclipse 9.0 正式版破解( myeclipse-9.0-offline-installer-windows.exe)
- JavaFX: Create Windows Native Installer and EXE with NetBeans 7.2
- 无法安装vcredist_x86.exe, 提示无法访问Windows Installer服务
- "msiexec.exe has encountered a problem and needs to close" "msiexec.exe 遇到问题需要关闭"
- Hibernate
- vi/vim基本使用方法
- AutoCAD ObjectARX和RealDWG资料
- 批处理和Shell资料
- CGI与ISAPI的区别
- windows Installer(msiexec.exe)命令行选项
- VisualStudio(devenv)命令行选项
- IIS(IISReset.exe)命令行
- Apache设置
- [在windows上使用Unix工具]unxutils
- 免费的命令行发email
- cookieJsp购物车
- 在windows上使用windows2003资源工具
- 在windows上使用win2000资源工具