怎么使用软件静默安装参数

怎么使用软件静默安装参数,第1张

软件静默参数的使用方法:首先,我们需要准备好软件,例如“QQ、QQ浏览器”等等,我这里就用QQ和搜狗输入法做例子。

把软件放在一个文件夹中,例如“桌面”,然后,打开记事本,输入软件的下载名称,如果觉得软件名称太长,可以修改,我修改了“QQ”和“搜狗输入法”这两个文件名,编辑文本内容为“QQ.exe /S”按下回车键,编辑另外一个软件的衫前纯文件“搜狗输入法.exe”保存,保存的问文本文档名称可以随便写,但是一定要加上“.bat”,因为“bat”是后缀名,如果不添加这个后缀名,则无法运行文件或咐,将编辑好的bat文件和软件放在同一个目录下,才可以执行,我这里把软件和bat文件放在了桌面上。然后,鼠标左键双击bat文件,就会自动运行,等待窗口执行完成会自动关闭就可以了。

注意:一般的悔团软件可以使用“/S"作为静默安装参数,有一部分的软件需要改变参数,不是每一个软件都可以实用同一个静默参数的。

大部分软件,其安装都具备一定的智能性,换句话说,许多软件的安装都能采取全自动或半自动的方式进行。

一、Microsoft Windows Installer

如果某个软件是用 Windows Installer 打包的,那你就应该能在文件夹中看到 *.msi 文件。这是最典型的特征,这些文件通常可以使用 /QB 和 /QN 参数进行自动安装。

/qb 会在窗口中显示一个基本的安装进程。

/qn 参数则不会显示任何窗口,直接在后台自动安装。

为了阻止某些程序安装成功后自动重启动(例如 Kerio Personal Firewall 4),你可以在 /qn 或者 /qb参数后使用REBOOT=Suppress标记。

例如:安装虚拟光驱 DaemonTools:msiexec /i dtools.msi /qb REBOOT=SUPPRESS

二、Windows 补丁包

有判姿明两种情况,一种是类似IE增量补丁包的那种安装文件,要使之静默安装,只需要在执行文件后加上 /q:a /r:n 参数即可;一种是 Windows 常用的补丁文件,册槐一般情况下加上 /U /N /Z 即可实现静默安装。(对于新的系统补丁,也可使用 /passive /norestart)。这通用大部分情况,但某些特定的补掘告丁不能用此法进行静默安装。

常用的软件封包形式主要有以下几个形式

Inno Setup

InstallShield

NSIS

Microsoft Windows Installer

WISE

QUOTE:

一.Inno Setup

使用Inno技术制成顷蚂的程序安装包可以使用/SILENT 和 /VERYSILENT参数进行静默安装

我不知道这两个参数有什么分别,因为它们实现的功能看上去是一样的

setup.exe /VERYSILENT

你会看到一个对话框,询问你是否打算继续安装:

我们可以通过使用毁乎链一个参数跳过这个对话框:

setup.exe /VERYSILENT /SP-

有些利用Inno 技术做作的安装包会在程序安装完毕后自动运行所安装的程序,例如ISOBuster

不过我们可以使用一个叫做Taskkill的系统自带工具杀死相关的进程。

以下是一个可以用于批处理文件安装由Inno打包的软件的命令的示例:

ECHO.

ECHO 正在安装ISOBuster 1.4

ECHO 请稍候...

start /wait %systemdrive%\install\Applications\ISOBuster\IsoBuster14.exe /VERYSILENT /SP-

ECHO.

ECHO Killing ISOBuster.exe process

taskkill.exe /F /IM isobuster.exe

ECHO.

我怎么知道哪个安装纤孙程序是用Inno 技术打包的?

这种软件安装时第一个界面一般如下图所示

在窗口标题栏左侧的图标上点击鼠标左键

然后再探出菜单上点击“About Setup”也可以看见安装类型

更多使用Inno技术打包的软件可用的参数可以在下面看到:

E文好的朋友可以仔细研究研究

With the Inno Setup Extentions in use the following command line switches become available:

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 [Setup] 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? messagebox. If it''s very silent it will reboot without asking.

/NORESTART

Instructs Setup not to reboot even if it''s necessary.

/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.

/SAVEINF="filename"

Instructs Setup to save installation settings to the specified file.

/DIR="x:\dirname"

Overrides the default directory name displayed on the Select Destination Directory wizard page. A fully qualified pathname

must be specified. If the [Setup] section directive DisableDirPage was set to yes, this command line parameter is ignored.

/GROUP="folder name"

Overrides the default folder name displayed on the Select Start Menu Folder wizard page. If the [Setup] section directive

DisableProgramGroupPage was set to yes, this command line parameter is ignored.

/NOICONS

Instructs Setup to initially disable 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


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/12406094.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-25
下一篇 2023-05-25

发表评论

登录后才能评论

评论列表(0条)

保存