為了加速 Windows XP 更新彙總的製作過程,腳本又改寫了一次。
語法:
@echo off & setlocal enabledelayedexpansion
set "dir1=rtmgdr" & set "dir2=rtmqfe" & set "file1=fileinfo.txt" & set "file2=filelist.txt"
del %file1% %file2% 2>nul
for %%f in (windows*.exe) do for /f "tokens=2 delims=-" %%r in ("%%f") do (
echo %%r
if not exist %%r %%f /q /x:%%r
cd %%r
del empty.cat spmsg.dll spuninst.exe spupdsvc.exe tapicust.dll tzchange.dll 2>nul
for /l %%i in (1,1,3) do if exist sp%%iqfe\ set "dir1=sp%%igdr" & set "dir2=sp%%iqfe"
for %%s in (!dir1!\* !dir2!\* !dir2!\ip\* uniproc\* wm41\* wm8\* wm9\*) do move "%%s"
for %%v in (asms lang) do xcopy /d /e /k /q /y !dir2!\%%v %%v\ 1>nul 2>&1
rd /q /s rtmgdr rtmqfe sp1gdr sp1qfe sp2gdr sp2qfe sp3gdr sp3qfe uniproc 2>nul
rd /q /s mceur2 v8dme wm41 wm8 wm9 wm10 wm10l wm10mix wm11 2>nul
rd /q /s update 2>nul
cd ..
echo %%r>>%file1%
echo ========================================>>%file1%
for /f "delims=" %%n in ('dir /a-d /b /s %%r ^2^>nul') do (
echo %%~nxn>>%file1%
sigcheck -n -q "%%n">>%file1%
echo.>>%file1%
)
xcopy /d /e /k /q /y %%r qfe\
echo.
)
for /f "delims=" %%n in ('dir /a-d /b /s qfe ^2^>nul') do (
echo %%~nxn>>%file2%
sigcheck -n -q "%%n">>%file2%
echo.>>%file2%
)
書籤