Windows 2000 Professional / Server SP-4 patch script
Last Updated: 2005-11-27
@echo off
REM ##############################################################################
REM
REM Windows 2000 Professional / Server SP-4 patch script by Doc Rice v1.1
REM This script requires the use of REG.EXE from the Windows NT 4.0 Resource Kit
REM and the SLEEP.EXE utility.
REM
REM An updated version of REG.EXE utility can be found at:
REM
REM ftp://ftp.microsoft.com/bussys/winnt/winnt-public/reskit/nt40/i386/reg_x86.exe
REM
REM SLEEP.EXE can be found at:
REM
REM http://www2.gol.com/users/trane/programming/programming.html
REM
REM
REM WARNING: This script assumes your Windows 2000 OS has been installed with
REM defaults and currently has DirectX 7.0.
REM
REM Please see http://winpatch.homeip.net for updated information.
REM
REM ##############################################################################
color 1F
title Windows 2000 SP-4 Hotfix Install
setlocal
for /f "tokens=7" %%i in ('".\QFECHECK\qfecheck.exe /v | find /i "service pack""') do set Service Pack=%%i
if 4 == %Service Pack% goto install
endlocal
goto nosp4
:install
echo Installing patches for Windows 2000 SP-4...
echo --------------------------------------------------------------------------------
echo Patch list updated as of 07/13/2004.
echo.
echo Today is %date%.
echo.
echo.
echo.
REM -------------------------------------------------------------
echo.
echo Checking for Q823559...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB823559\Description" /s || echo Patching for Q823559... && .\OS\Q823559\Windows2000-KB823559-x86-ENU.exe /u /q /z
echo.
echo Checking for Q824105...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB824105\Description" /s || echo Patching for Q824105... && .\OS\Q824105\Windows2000-KB824105-x86-ENU.exe /u /q /z
echo.
echo Checking for Q824146...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB824146\Description" /s || echo Patching for Q824146... && .\OS\Q824146\Windows2000-KB824146-x86-ENU.exe /u /q /z
echo.
echo Checking for Q823182...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB823182\Description" /s || echo Patching for Q823182... && .\OS\Q823182\Windows2000-KB823182-x86-ENU.exe /u /q /z
echo.
echo Checking for Q826232...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB826232\Description" /s || echo Patching for Q826232... && .\OS\Q826232\Windows2000-KB826232-x86-ENU.exe /u /q /z
echo.
echo Checking for Q828035...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB828035\Description" /s || echo Patching for Q828035... && .\OS\Q828035\Windows2000-KB828035-x86-ENU.exe /u /q /z
echo.
echo Checking for Q825119...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB825119\Description" /s || echo Patching for Q825119... && .\OS\Q825119\Windows2000-KB825119-x86-ENU.exe /u /q /z
echo.
echo Checking for Q824141...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB824141\Description" /s || echo Patching for Q824141... && .\OS\Q824141\Windows2000-KB824141-x86-ENU.exe /u /q /z
echo.
echo Checking for Q828749...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB828749\Description" /s || echo Patching for Q828749... && .\OS\Q828749\Windows2000-KB828749-x86-ENU.exe /u /q /z
echo.
echo Checking for MS04-006...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB830352\Filelist" /s || echo Patching - see Q830352... && .\OS\Q830352\Windows2000-KB830352-x86-ENU.EXE /quiet /norestart
echo.
echo Checking for MS04-007...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB828028\Filelist" /s || echo Patching - see Q828028... && .\OS\Q828028\Windows2000-KB828028-x86-ENU.EXE /quiet /norestart
echo.
echo Checking for MS04-011...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB835732\Filelist" /s || echo Patching - see Q835732... && .\OS\Q835732\Windows2000-KB835732-x86-ENU.EXE /quiet /norestart
echo.
echo Checking for MS04-012...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB828741\Filelist" /s || echo Patching - see Q828741... && .\OS\Q828741\Windows2000-KB828741-x86-ENU.EXE /quiet /norestart
echo.
echo Checking for MS04-014...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB837001\Filelist" /s || echo Patching - see Q837001... && .\OS\Q837001\Windows2000-KB837001-x86-ENU.EXE /quiet /norestart
echo.
echo Checking for MS04-019...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB842526\Filelist" /s || echo Patching - see Q842526... && .\OS\Q842526\Windows2000-KB842526-x86-ENU.EXE /quiet /norestart
echo.
echo Checking for MS04-020...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB841872\Filelist" /s || echo Patching - see Q841872... && .\OS\Q841872\Windows2000-KB841872-x86-ENU.EXE /quiet /norestart
echo.
echo Checking for MS04-022...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB841873\Filelist" /s || echo Patching - see Q841873... && .\OS\Q841873\Windows2000-KB841873-x86-ENU.EXE /quiet /norestart
echo.
echo Checking for MS04-023...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB840315\Filelist" /s || echo Patching - see Q840315... && .\OS\Q840315\Windows2000-KB840315-x86-ENU.EXE /quiet /norestart
echo.
echo Checking for MS04-024...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB839645\Filelist" /s || echo Patching - see Q839645... && .\OS\Q839645\Windows2000-KB839645-x86-ENU.EXE /quiet /norestart
REM -------------------------------------------------------------
echo.
echo.
echo Patching Internet Explorer
echo --------------------------------------------------------------------------------
echo.
setlocal
for /f "tokens=3" %%i in ('.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version"') do set IE_Version=%%i
if 5.00.3700.1000 == %IE_Version% (goto patch-ie501sp4)
if 5.50.4807.2300 == %IE_Version% (goto patch-ie55sp2)
if 6.0.2800.1106 == %IE_Version% (goto patch-ie6sp1) else (goto mdac)
:patch-ie501sp4
echo.
echo Checking for MS04-004...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{eddbec60-89cb-44ef-8291-0850fd28ff6a}\Version" /s || echo Patching - see Q832894... && .\IE_5.01\Q832894-SP4\Q832894.exe /q:a /r:n
goto mdac
:patch-ie55sp2
echo.
echo Checking for MS04-004...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{eddbec60-89cb-44ef-8291-0850fd28ff6a}\Version" /s || echo Patching - see Q832894... && .\IE_5.5\Q832894\Q832894.exe /q:a /r:n
goto mdac
:patch-ie6sp1
echo.
echo Checking for MS04-004...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components\{eddbec60-89cb-44ef-8291-0850fd28ff6a}\Version" /s || echo Patching - see Q832894... && .\IE_60\Q832894\Q832894.exe /q:a /r:n
goto mdac
endlocal
:mdac
REM -------------------------------------------------------------
echo.
echo.
echo Patching MDAC 2.5 SP-3
echo --------------------------------------------------------------------------------
echo.
echo.
echo Checking for Q329414...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\DataAccess\Q329414-25\Description" /s || echo Patching for Q329414... && .\MDAC\Q329414\q329414_mdacall_x86.exe /C:"dahotfix.exe /q /n" /q
echo.
echo Checking for MS04-003...
.\REG\REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\DataAccess\Q832483\Description" /s || echo Patching - see Q832483... && .\MDAC\Q832483\ENU_Q832483_MDAC_x86.EXE /C:"dahotfix.exe /q /n" /q
REM -------------------------------------------------------------
echo.
echo.
echo Qchaining hotfixes...
echo.
.\Qchain\qchain.exe
REM -------------------------------------------------------------
color
echo.
echo.
echo Initial update process for Windows 2000 SP-4 completed. Please reboot
echo for all hotfixes to take effect and verify patch levels afterwards.
echo.
.\SLEEP\sleep.exe 03
goto end
:nosp4
echo Service Pack 4 is not installed on this system. Please install SP4
echo before running this script.
echo.
pause
goto end
:end
No Comments yet .....
Add Your Comment:
Note: All posts require administrator approval. Please allow 24 hours for message approval.