当前位置: 移动技术网 > IT编程>网络>Dos/Bat > BAT批处理实现自动安装软件功能

BAT批处理实现自动安装软件功能

2017年12月08日  | 移动技术网IT编程  | 我要评论
cls @echo off echo. echo 安装 diskeeper 7.0.428 echo 请稍等... start /wait %system
cls
@echo off
echo.
echo 安装 diskeeper 7.0.428
echo 请稍等...
start /wait %systemdrive%\install\applications\diskeeper\setup.exe /s /v/qn
echo.
echo 更新 diskeeper 7.0.428 到 7.0.430
echo 请稍等...
start /wait %systemdrive%\install\applications\diskeeper\us_dk70_wup_build430.exe /s /v/qn
echo.
echo 安装 flashget 1.4
echo 请稍等...
start /wait %systemdrive%\install\applications\flashget\fgf140.exe /s
echo.
echo 安装 symantec antivirus corporate 8.1
echo 请稍等...
start /wait %systemdrive%\install\applications\sav\sav810b821.exe /qn
echo.
exit

用记事本输入,保存为*.bat。具体路径自己更改,每空一行就是单独的一个。如果在dos下,变量只用%,作成批处理,就要用%%。
特别说明:“安装windows 补丁”这个批处理有点不妥,因为windows 补丁有两种类型,一种是简单的可执行文件,即没有图标的,另一种是有图标的,所以改用另一种批处理(/r参数表示包括子文件夹。"_sfx_cab_exe_path"是特征字符串,关于特征字符串地获得:可以用记事本打开两种不同的补丁,找出两文本不同的字符,可能用fc命令也可以。

for /r %%f in (*.exe) do @((@findstr _sfx_cab_exe_path "%%f" >nul && @start /wait %%f /u /q /z) || @start /wait %%f /q)
qchain.exe

echo 正在安装 windows 补丁,请稍等...
cd e:\hotfix
for %a in (*.exe) do start /wait %a -z -q
qchain.exe
echo.

echo 正在安装 msn messenger 6.0,请稍等...
start /wait e:\software\messenger\msnmsgs.msi /qb
echo.

echo 正在安装 directx 9.0b,请稍等...
start /wait e:\software\dx9\dxsetup.exe /install /silent
echo.

echo 正在安装 windows media player 9,请稍等...
start /wait e:\software\wmp9xp.exe /q:a /r:n
echo.

echo 正在安装 movie maker 2.0,请稍等...
start /wait e:\software\wmm2\mm20.msi /qn
echo.

echo 正在安装 .net framework v1.1,请稍等...
start /wait e:\software\netframework\netfx.msi /qb
echo.

echo 正在安装 microsoft javavm,请稍等...
start /wait e:\software\msjavwu.exe /q:a /r:n
echo.

echo 正在安装 isobuster,请稍等……
regedit /s e:\software\isobuster.reg
start /wait e:\software\isobuster.exe /verysilent
echo.

echo 正在安装ad-aware 6,请稍等……
start /wait e:\software\adaware.exe /s
echo.

echo 正在安装winamp,请稍等……
start /wait e:\software\winamp.exe /s
echo.

echo 正在安装adobe reader 6,请稍等……
start /wait e:\software\adberdr60.exe -p"-s /v\"/qn\""
echo.

echo 正在安装nero burning rom 6,请稍等……
regedit /s e:\software\nero.reg
start /wait e:\software\nero6009.exe /silent /noreboot
echo.

echo 正在安装winrar,请稍等……
start /wait e:\software\wrar320.exe /s
echo.

echo 正在安装 flashget,请稍等……
start /wait e:\software\flashget.exe /s
echo.

echo 正在安装 symantec antivirus corporate 8.1,请稍等……
start /wait e:\software\nav81chs.exe /qn
echo.

echo 正在安装 zonealarm free,请稍等……
start /wait e:\software\zonealarm.exe /s /noreboot

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网