Place it in the patch directory and run it. It can automatically judge the installed patches and skip them (no temporary files are generated, and the skipping speed is much faster than using findstr to search the temporary list). For other details, please refer to the file instructions
Troubleshooters who can find the registration locations of other patched installations, please give a heads-up
Please change {TAB} to the tab key (keyboard TAB key)
[ Last edited by zh159 on 2007-12-7 at 12:36 AM ]
Troubleshooters who can find the registration locations of other patched installations, please give a heads-up
Please change {TAB} to the tab key (keyboard TAB key)
::XP Patch Automatic Installation - code zh159@bbs.cn-dos.net 2007-12-6
::This current XP patch installation can only automatically install parameters /q /z /o,
::and XP patches registered in ,
::the rest are modified by yourself.
@echo off
title XP Patch Installation
echo.
echo. Getting the list of installed patches on the system, please wait...
echo.
for /f "tokens=7 delims=\" %%i in ('reg query "HKLM\SOFTWARE\Microsoft\windows nt\Currentversion\Hotfix"^|findstr /i "kb"') do (
set "str=%%i"
call set "☉%%str:~0,8%%= "
set /a Num+=1
call set/p= There are %%Num%% patches installed on the system. <nul
set /p=<nul
)
echo.&echo.
set Num=0
for /f "delims=" %%i in ('dir/b/on *KB*.exe 2^>nul') do (
for /f "tokens=2 delims=-" %%n in ("%%i") do set "⊕%%n=%%i"
set /a Num+=1
call set/p= There are %%Num%% patches in the current directory. <nul
set /p=<nul
)
if %Num% == 0 echo. There are no XP patch files in the current directory! Press any key to exit the program. &pause>nul&exit
echo.&echo.
set Num=0
echo. Do you want to start installing patches?
set /p YN= ( directly press Enter to start installation/ display the list of installed patches on the system/ exit):
if /i "%YN%" == "X" exit
if /i "%YN%" == "L" (
echo.
for /f "delims=☉=" %%i in ('set ☉') do (
set /a Num+=1
call set "List= %%Num%%. "
call set "List=%%List:~-6%%"
call set/p=%%List%%%%i{TAB}<nul
)
echo.&echo.&echo. Please press any key to continue installing patches... &pause>nul
)
echo.
echo. Starting to install patches...
echo.
set Num=0
set New=0
for /f "tokens=1,2* delims=⊕=" %%n in ('set ⊕') do (
set /a Num+=1
if defined ☉%%n (
call echo. %%Num%%.{TAB}%%o Patch has been installed.
) else (
set /a New+=1
call echo. %%Num%%.{TAB}%%o Patch starts to install, please wait...
call %%o /q /z /o
)
)
echo.
echo Patch installation is complete, %New% new patches were installed this time!
pause>nul
exit
[ Last edited by zh159 on 2007-12-7 at 12:36 AM ]
Recent Ratings for This Post
( 1 in total)
Click for details
| Rater | Score | Time |
|---|---|---|
| lijinan | +2 | 2010-06-19 18:14 |



