Board logo

标题: 使用批处理安装补丁 [打印本页]

作者: alwaysrun     时间: 2010-2-26 17:16    标题: 使用批处理安装补丁
自己没事时,写的一个方便打补丁的小程序,感觉有用就顶一下

@Echo off & setlocal EnableDelayedExpansion
@Echo ****** To Install WinXP Packets... ******

rem Get the total number of files
set Total=0
for %%f in (*.exe) do set /a Total+=1

set /a Index=1
set PackName=None
set FileName=%windir%\xInstXP.dat

rem Check whether the file has existed, otherwise create it
if not exist %FileName% @Echo Packet Installed > %FileName%

rem Install The Packets
for %%f in (*.exe) do (
set PackName="%%f"
find /I !PackName! < %FileName% > nul
if errorlevel 1 (
@Echo *Install Windows Packets !Index! / !Total!
%%f /passive /norestart
@Echo !PackName! >> %FileName%
) else (
@Echo *Packet Has Installed !Index! / !Total!
)

set /a Index+=1
)

@Echo ****** Install WinXP Packets Complete ******

作者: HAT     时间: 2010-2-26 18:26
据说加上qchain.exe会比较好
http://bbs.bathome.cn/thread-3675-1-1.html