常用的几种安装程序的安装参数
这些东西全部来自网络,我自己收集整理的,现在发出来大家分享,免得大家找得辛苦,版权归原作者所有!有了这些参数,大家可以对没有夹带垃圾插件的安装包进行静默安装和自定义安装,这样做的好处是:
1.不必像AU3一样写脚本,省去了麻烦。
2.不受外界干扰(不像AU3那样严格的对环境和窗口进行要求)
================================================
MS官方Hotfix安装程序(CAB算法的sfx)常用参数:
可用的选项:
/help 显示此信息
安装模式
/quiet 安静模式(没有用户交互操作或显示)
/passive无人参与模式(仅显示进度栏)
重新启动选项
/norestart 安装完成后不要重新启动
/forcerestart安装后重新启动
/warnrestart[:<seconds>]如果需要,显示警告并自动重新启动(默认超时 30 秒)
/promptrestart 如果需要重新启动,提示用户
特别选项
/overwriteoem不提示覆盖 OEM 文件
/nobackup不备份卸载需要的文件
/forceappsclose强制其他程序在关机时关闭
/integrate:<fullpath> 将此软件更新集成到 <fullpath>
/log:<fullpath>在 <fullpath> 创建日志文件
=========================================
也有特殊的,比如IE7:
可用选项:
/help 显示此消息。
安装模式:
/passive 运行安装,同时用户不必输入任何内容。
/quiet 与 /passive 相同,但不显示任何用户界面。
安装选项:
/update-no 不查找 Internet Explorer 更新。
/no-default 不使用 Internet Explorer 作为默认浏览器。
/nobackup 不备份以后卸载 Internet Explorer 时所需要的文件。
/ieak-full:<路径> 保留给 Internet Explorer 管理工具包使用。
/ieak-branding:<路径> 保留给 Internet Explorer 管理工具包使用。
重新启动选项:
/norestart 安装完成后不重新启动。
/forcerestart 安装后重新启动。
杂项:
/log:<路径> 在 <路径> 下创建日志文件。
这是MS官方的资料:http://msdn.microsoft.com:80/en-us/library/aa372024(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa367988(VS.85).aspx
很全面的,大家可以自己看。
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
还是MS官方的MSI安装程序的常用参数:
Windows (R) Installer. V 4.5.6001.22159
msiexec /Option <Required Parameter>
安装选项
</package | /i> <Product.msi>
安装或配置产品
/a <Product.msi>
管理安装 - 在网络上安装产品
/j<u|m> <Product.msi>
公布产品 - m 公布到所有用户,u 公布到当前用户
</uninstall | /x> <Product.msi | ProductCode>
卸载产品
显示选项
/quiet
安静模式,无用户交互
/passive
无人参与模式 - 只显示进度栏
/q
设置用户界面级别
n - 无用户界面
b - 基本界面
r - 精简界面
f - 完整界面(默认值)
/help
帮助信息
重新启动选项
/norestart
安装完成后不重新启动
/promptrestart
必要时提示用户重新启动
/forcerestart
安装后始终重新启动计算机
日志选项
/l <LogFile>
i - 状态消息
w - 非致命警告
e - 所有错误消息
a - 操作的启动
r - 操作特定记录
u - 用户请求
c - 初始用户界面参数
m - 内存不足或致命退出信息
o - 磁盘空间不足消息
p - 终端属性
v - 详细输出
x - 额外调试信息
+ - 扩展到现有日志文件
! - 每一行刷新到日志
* - 记录所有信息,除了 v 和 x 选项
/log <LogFile>
与 /l* <LogFile> 相同
更新选项
/update <Update1.msp>[;Update2.msp]
应用更新
/uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>
删除产品的更新
修复选项
/f <Product.msi | ProductCode>
修复产品
p - 仅当文件丢失时
o - 如果文件丢失或安装了更旧的版本(默认值)
e - 如果文件丢失或安装了相同或更旧的版本
d - 如果文件丢失或安装了不同版本
c - 如果文件丢失或较验和与计算的值不匹配
a - 强制重新安装所有文件
u - 所有必要的用户特定注册表项(默认值)
m - 所有必要的计算机特定注册表项(默认值)
s - 所有现有的快捷键方式(默认值)
v - 从源运行并重新缓存本地安装包
设置公共属性
请查阅 Windows (R) Installer SDK 获得有关
命令行语法的其他文档。
版权所有 (C) Microsoft Corporation. 保留所有权利。
此软件的部分内容系基于 Independent JPEG Group 的工作。
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
下面是NSIS打包的安装程序的常用参数:
Which command line parameters can be used to configure installers From NSIS Wiki
/SSilent installation
/D=C:\BlaSet output folder
/NCRCSkip CRC check
一共就3个参数
Note that command line options can be disabled by the author of an installer.
Retrieved from "http://nsis.sourceforge.net/Which_command_line_parameters_can_be_used_to_configure_installers"
++++++++++++++++++++++++++++++++++++++++++++++++++++
接下来是InstallShield安装程序的常用参数:
InstallShield Setup Silent Installation Switches
Link | 6/14/2002 | Submitted By bkelly
Those setup.exe files generated with InstallShield inherently support the creation and use of answer files that may be used to silent install applications. Although it has no logic to handle anything not expected by the answerfile (more or less dialogs, more or less options in a dialog) it can be a helpful means of installation for some applications. The supported switches are as follows:
-d
Runs setup in debug mode. The -d switch also includes a option for specifying the path of the Setup.rul file. For more information, refer to the Visual Debugger help file.
-f
Specifies an alternate compiled script. Unless the compiled script (.ins file) also resides in the same directory as that of Setup.exe, the full path to the compiled script must be specified. _setup.dll must also reside in the same directory as your .ins file. For example, setup -ftest.ins will launch setup using Test.ins instead of Setup.ins.
-f1
Specifies an alternate location and name of the response file (.iss file). If this option is used when running InstallShield Silent, the response file is read from the folder/file specified by. If this option is used along with the -r option, the response file is written to the folder/file specified by. If an alternate compiled script is specified using the -f switch, the -f1 switch entry must follow the -f switch entry.
-f2
Specifies an alternate location and name of the log file created by InstallShield Silent. By default, Setup.log log file is created and stored in the same directory as that of Setup.ins. If an alternate compiled script is specified using the -f switch, the -f2 switch entry must follow the -f switch entry.
-m
Causes Setup.exe to generate a Management Information Format (.mif) file automatically at the end of the setup. Do not include a path - the .mif file is always placed in the Windows folder. is optional. If you do not specify a filename, the resulting file will be called Status.mif.
-m1
Tells setup to place the indicated serial number in the created .mif file.
-m2
Tells setup to place the indicated locale in the .mif file. English (ENU) is the default; refer to Microsoft documentation for a complete listing of locale strings.
-r
Causes Setup.exe automatically to generate a silent setup file (.iss file), which is a record of the setup input, in the Windows folder.
-s
Runs InstallShield Silent to execute a silent setup.
-SMS
Prevents a network connection and Setup.exe from closing before the setup is complete. This switch works with setups originating from a Windows NT server over a network. Please note that SMS must be uppercase; this is a case-sensitive switch.
-z
Prevents Setup.exe from checking the available memory during initialization. This switch is necessary when running a setup on a machine with more than 256 MB of memory; if it is not used, Setup.exe reports insufficient memory and exits.
-uninst
Runs the setup as an uninstallation without reading the script.
-verbose
Provides more detailed information when a Setup.exe error occurs.
Please note the following(请注意以下问题):
Setup.exe command line parameters are not case sensitive; upper case or lower case letters can be used.
Separate multiple command line switches with a space, but do not put a space inside a command line switch (for example, /r /fInstall.ins is valid, but not /r/f Install.ins).
When using long path and filename expressions with switches, enclose the expressions in double quotation marks. The enclosing double quotes tell the operating system that spaces within the quotation marks are not to be treated as command line delimiters.
++++++++++++++++++++++++++++++++++++++++++++++++++++
再接着是Wise安装程序的常用参数:
Wise Setup.exe Switches
12/9/2007 | Submitted By bkelly
Wise Setup.exe Switches
/T test mode
/X pathname extracts files into pathname
/Z pathname extracts files into pathname and reboots
/S silent install
/M prompts for windows, system, temp dirs
/M=filename specifies a value file similar to /d above,
but for standard variables
/M1 same as /m plus it prompts before any file that is self-registered
/M2 reserved for internal use by Wise during debugger sessions
Uninstall (Unwise.exe switches)
/Z remove empty directories, including one with unwise itself in it.
/A automatic mode, no user choices other than cancel.
/S silent mode, automatic mode with no user choices
/R rollback mode, selects option to rollback on uninstall
/U like automatic mode, but gives all choices other than custom/automatic
title window title can be at the end of the command line.
Also note that you can find uninstall commands for over a hundred thousand applications in the Software Knowledge Base.
++++++++++++++++++++++++++++++++++++++++++++++++++++
然后是Innosetup的常用参数:
The Setup program accepts optional command line parameters. These can be useful to system administrators, and to other programs calling the Setup program.
/SP-
Disables the This will install... Do you wish to continue? prompt at the beginning of Setup. Of course, this will have no effect if the DisableStartupPrompt section directive was set to yes
/SILENT, /VERYSILENT
Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed but the installation progress window is. When a setup is very silent this installation progress window is not displayed. Everything else is normal so for example error messages during installation are displayed and the startup prompt is (if you haven't disabled it with DisableStartupPrompt or the '/SP-' command line option explained above)
If a restart is necessary and the '/NORESTART' command isn't used (see below) and Setup is silent, it will display a Reboot now? message box. If it's very silent it will reboot without asking.
/SUPPRESSMSGBOXES
Instructs Setup to suppress message boxes. Only has an effect when combined with '/SILENT' and '/VERYSILENT'.
The default response in situations where there's a choice is:
-Yes in a 'Keep newer file?' situation.
-No in a 'File exists, confirm overwrite.' situation.
-Abort in Abort/Retry situations.
-Cancel in Retry/Cancel situations.
-Yes (=continue) in a DiskSpaceWarning/DirExists/DirDoesntExist/NoUninstallWarning/ExitSetupMessage/ConfirmUninstall situation.
-Yes (=restart) in a FinishedRestartMessage/UninstalledAndNeedsRestart situation.
5 message boxes are not suppressible:
-The About Setup message box.
-The Exit Setup? message box.
-The FileNotInDir2 message box displayed when Setup requires a new disk to be inserted and the disk was not found.
-Any (error) message box displayed before Setup (or Uninstall) could read the command line parameters.
-Any message box displayed by support function MsgBox
/LOG
Causes Setup to create a log file in the user's TEMP directory detailing file installation and actions taken during the installation process. This can be a helpful debugging aid. For example, if you suspect a file isn't being replaced when you believe it should be (or vice versa), the log file will tell you if the file was really skipped, and why.
The log file is created with a unique name based on the current date. (It will not overwrite or append to existing files.)
The information contained in the log file is technical in nature and therefore not intended to be understandable by end users. Nor is it designed to be machine-parseable; the format of the file is subject to change without notice.
/LOG="filename"
Same as /LOG, except it allows you to specify a fixed path/filename to use for the log file. If a file with the specified name already exists it will be overwritten. If the file cannot be created, Setup will abort with an error message.
/NOCANCEL
Prevents the user from cancelling during the installation process, by disabling the Cancel button and ignoring clicks on the close button. Useful along with '/SILENT' or '/VERYSILENT'.
/NORESTART
Instructs Setup not to reboot even if it's necessary.
/RESTARTEXITCODE=exit code
Specifies the custom exit code that Setup is to return when a restart is needed. Useful along with '/NORESTART'. Also see Setup Exit Codes
/LOADINF="filename"
Instructs Setup to load the settings from the specified file after having checked the command line. This file can be prepared using the '/SAVEINF=' command as explained below.
Don't forget to use quotes if the filename contains spaces.
/SAVEINF="filename"
Instructs Setup to save installation settings to the specified file.
Don't forget to use quotes if the filename contains spaces.
/LANG=language
Specifies the language to use. language specifies the internal name of the language as specified in a section entry.
When a valid /LANG parameter is used, the Select Language dialog will be suppressed.
/DIR="x:\dirname"
Overrides the default directory name displayed on the Select Destination Location wizard page. A fully qualified pathname must be specified.
/GROUP="folder name"
Overrides the default folder name displayed on the Select Start Menu Folder wizard page. If the section directive DisableProgramGroupPage was set to yes, this command line parameter is ignored.
/NOICONS
Instructs Setup to initially check the Don't create any icons check box on the Select Start Menu Folder wizard page.
/COMPONENTS="comma separated list of component names"
Overrides the default components settings. Using this command line parameter causes Setup to automatically select a custom type.
/TASKS="comma separated list of task names"
Specifies a list of tasks that should be initially selected or deselected. To deselect a task, prefix its name with a "!" character.
Only the specified tasks (and their children) will be selected; the rest will be deselected. Use the /MERGETASKS parameter instead if you want to keep the default set of tasks and only select/deselect some of them.
Examples:
Deselect all tasks, then select the "desktopicon" and "fileassoc" tasks:
/TASKS="desktopicon,fileassoc"
Deselect all tasks, then select a parent task item, but exclude one of its children:
/TASKS="parent,!parent\child"
/MERGETASKS="comma separated list of task names"
Like the /TASKS parameter, except the specified tasks will be merged with the set of tasks that would have otherwise been selected by default.
If UsePreviousTasks is set to yes, the specified tasks will be selected/deselected after any previous tasks are restored.
Examples:
Keep the default set of selected tasks, but additionally select the "desktopicon" and "fileassoc" tasks:
/MERGETASKS="desktopicon,fileassoc"
Keep the default set of selected tasks, but deselect the "desktopicon" task:
/MERGETASKS="!desktopicon"
/PASSWORD=password
Specifies the password to use. If the section directive Password was not set, this command line parameter is ignored.
When an invalid password is specified, this command line parameter is also ignored.
SETUP EXIT CODES
Beginning with Inno Setup 3.0.3, the Setup program may return one of the following exit codes:
0 Setup was successfully run to completion.
1 Setup failed to initialize.
2 The user clicked Cancel in the wizard before the actual installation started, or chose "No" on the opening "This will install..." message box.
3 A fatal error occurred while preparing to move to the next installation phase (for example, from displaying the pre-installation wizard pages to the actual installation process). This should never happen except under the most unusual of circumstances, such as running out of memory or Windows resources.
4 A fatal error occurred during the actual installation process.
Note: Errors that cause an Abort-Retry-Ignore box to be displayed are not fatal errors. If the user chooses Abort at such a message box, exit code 5 will be returned.
5 The user clicked Cancel during the actual installation process, or chose Abort at an Abort-Retry-Ignore box.
6 The Setup process was forcefully terminated by the debugger (Run | Terminate was used in the IDE).
Before returning an exit code of 1, 3, or 4, an error message explaining the problem will normally be displayed.
Future versions of Inno Setup may return additional exit codes, so applications checking the exit code should be programmed to handle unexpected exit codes gracefully. Any non-zero exit code indicates that Setup was not run to completion.
UNINSTALLER COMMAND LINE PARAMETERS
The uninstaller program (unins???.exe) accepts optional command line parameters. These can be useful to system administrators, and to other programs calling the uninstaller program.
/SILENT, /VERYSILENT
When specified, the uninstaller will not ask the user for startup confirmation or display a message stating that uninstall is complete. Shared files that are no longer in use are deleted automatically without prompting. Any critical error messages will still be shown on the screen. When '/VERYSILENT' is specified, the uninstallation progress window is not displayed.
If a restart is necessary and the '/NORESTART' command isn't used (see below) and '/VERYSILENT' is specified, the uninstaller will reboot without asking.
/SUPPRESSMSGBOXES
Instructs the uninstaller to suppress message boxes. Only has an effect when combined with '/SILENT' and '/VERYSILENT'. See '/SUPPRESSMSGBOXES' under Setup Command Line Parameters for more details.
/LOG
Causes Uninstall to create a log file in the user's TEMP directory detailing file uninstallation and actions taken during the uninstallation process. This can be a helpful debugging aid.
The log file is created with a unique name based on the current date. (It will not overwrite or append to existing files.) Currently, it is not possible to customize the filename.
The information contained in the log file is technical in nature and therefore not intended to be understandable by end users. Nor is it designed to be machine-parseable; the format of the file is subject to change without notice.
/NORESTART
Instructs the uninstaller not to reboot even if it's necessary.
UNINSTALLER EXIT CODES
Beginning with Inno Setup 4.0.8, the uninstaller will return a non-zero exit code if the user cancels or a fatal error is encountered. Programs checking the exit code to detect failure should not check for a specific non-zero value; any non-zero exit code indicates that the uninstaller was not run to completion.
Note that at the moment you get an exit code back from the uninstaller, some code related to uninstallation might still be running. Because Windows doesn't allow programs to delete their own EXEs, the uninstaller creates and spawns a copy of itself in the TEMP directory. This "clone" performs the actual uninstallation, and at the end, terminates the original uninstaller EXE (at which point you get an exit code back), deletes it, then displays the "uninstall complete" message box (if it hasn't been suppressed with /SILENT or /VERYSILENT).
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
另外一些杂七杂八的安装参数:
WinRAR的SFX的静默安装参数: /S
[ 本帖最后由 a_wind 于 2008-8-15 13:29 编辑 ]
这是上面几种安装程序的判断方法
MS官方的Hotfix就不说了,大家要注意的是:1.它没有标准的图标,是个DOS图标
2.它可以用RAR解压开
一般结构就是:解压缩后,在Update目录下有个*.exe,那就是安装程序的主执行文件。
现在比较常用的有三种安装程序:NSIS、InnoSetup、InstallShieldNSIS用的是7Z的算法,INNO则比较常用于小软件的打包;InstallShield是个专业级的安装打包程序,一般用于商业软件和一些较大的应用软件的安装制作上,它的特点也是安装程序的EXE文件可以被RAR解压,如果不能,那就是被加壳了。大家可以把他们解压看看。
下面是图片:
[ 本帖最后由 a_wind 于 2008-8-15 13:22 编辑 ] 有用么?弄成中文的说不定还有点用 ???怎么看不太懂啊~:face (30): 这个放到中文资料更合适,做自动安装必须要知道的. 上面的图~~这图很帅 !! 我找好久了,谢谢!:face (29): 很全面。支持!:face (37): :face (29): 还是不错的。支持一下! 安装你的方法知道了是NSIS的。
然后我在CMD下运行程序的时候在后面加参数/s
结果还是显示了窗口的。 嗯,很有用的资料,收藏了,感谢:face (29): 很全面。支持 楼主太强了,我试验下,好多都管事 我就是奇怪怎么用AU3命令直接加截参数运行 学习中~~有点难、~但是我会努力的~