@rem Apply Office 2003 Service Pack 2 and all critical post-SP2 hotfixes @rem Copyright (c) 2003-2007, Ross Smith. All rights reserved. :: sp3 includes: ::925251 Update for Office 2003 ::924886 Update for Office 2003 ::919029 Update for Office 2003 ::923097 Update for Office 2003 ::923272 Security Update for Office 2003 ::924424 Security Update for Office 2003 ::921566 Security Update for Office 2003 ::917151 Security Update for Office 2003 ::914455 Security Update for Office 2003 ::913571 Update for Office 2003 ::905645 Security Update for Office 2003 ::907417 Update for Office 2003 ::918419 Security Update for Excel 2003 ::905756 Security Update for Excel 2003 ::920103 Update for InfoPath 2003 ::913807 Update for Outlook 2003 ::892843 Security Update for Outlook 2003 ::916518 Security Update for PowerPoint 2003 ::894542 Security Update for Publisher 2003 ::917334 Security Update for Word 2003 ::940602 Security Update for Excel 2003 ::936048 Security Update for Office 2003 :: ChangeLog: :: 20-Jul-07: :: :: Added KB936507 : MS07-036: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (Critical) @rem $Id$ @if "%debug%" == "" echo off @if not "%debug%" == "" echo on :: the relative directory containing the SP2 and all hotfixes :: do not include trailing backslash :: if left blank, the current directory will be used set hotfixdir=. :: options for hotfixes set options=/q if not "%1" == "" ( set hotfixdir=%1 ) verify other 2>nul setlocal enableextensions setlocal enabledelayedexpansion if exist "%hotfixdir%" goto hotfix_ok :get_hotfix echo. echo Enter the directory path to contain Service Pack 2 and the hotfixes set REPLY= set /p REPLY=or press [Enter] for '%hotfixdir%' or enter Q to quit : if /i "%reply%" == "Q" goto :eof if not exist "%reply%\" ( echo. echo The directory '%reply%' does not exist echo. goto get_hotfix ) set hotfixdir=%reply% :hotfix_ok echo Please save all files in the directory '%hotfixdir%' if not "%DOWNLOADER%" == "" goto start_downloads wget --version >nul 2>nul if not errorlevel 9009 ( set DOWNLOADER=wget -nd -N goto start_downloads ) curl --version >nul 2>nul if not errorlevel 9009 ( set DOWNLOADER=curl -k -L -O -R goto start_downloads ) set DOWNLOADER=start /D"%hotfixdir%" /wait /b :start_downloads del office2003-KB923094-FullFile-ENU.exe >nul 2>nul del office2003-KB923272-FullFile-ENU.exe >nul 2>nul del office2003-KB925257-FullFile-ENU.exe >nul 2>nul del office2003-KB929057-FullFile-ENU.exe >nul 2>nul del office2003-KB929064-FullFile-ENU.exe >nul 2>nul :: Jul 07: del office2003-KB933666-FullFile-ENU.exe >nul 2>nul :: Aug 07 del office2003-KB936507-FullFile-ENU.exe >nul 2>nul :: http://support.microsoft.com/kb/887616 : Office 2003 Service Pack 2 call :download http://download.microsoft.com/download/9/b/3/9b37f157-123d-41fd-a3f4-f4aedd0cc847/Office2003SP2-KB887616-FullFile-ENU.exe :: http://support.microsoft.com/kb/914455 : MS06-039: Security Update for Office 2003 (KB914455) (Moderate) call :download http://download.microsoft.com/download/f/b/f/fbf5215b-9b62-4706-8582-1bbc5f9d1b6d/office2003-KB914455-FullFile-ENU.exe :: http://support.microsoft.com/kb/923091 : MS06-058 Security Update for PowerPoint 2003 (KB923091) (Important) call :download http://download.microsoft.com/download/f/3/f/f3fbdabe-e7b4-4fbc-a4c4-09b4b3e8ab65/office2003-KB923091-FullFile-ENU.exe :: http://support.microsoft.com/kb/923272 : MS06-062: Security Update for Office 2003 (KB923272) (Important) :: replaced with MS07-015 :: call :download http://download.microsoft.com/download/0/a/c/0ac9daa9-5d89-4613-a28e-de1e0c39c22d/office2003-KB923272-FullFile-ENU.exe :: http://support.microsoft.com/kb/923094 : MS06-060: Security Update for Word 2003 (KB923094) (Important) :: replaced with MS07-014 :: call :download http://download.microsoft.com/download/c/e/1/ce14207e-9ca6-4097-80ce-914a163dee24/office2003-KB923094-FullFile-ENU.exe :: http://support.microsoft.com/kb/924424 : MS06-061: Security Update for Office 2003 (KB924424) (Critical) call :download http://download.microsoft.com/download/d/a/4/da444f2e-670b-4062-b57f-d709491b2df8/office2003-KB924424-FullFile-ENU.exe :: http://support.microsoft.com/kb/925257 : MS07-002: Security Update for Excel 2003 (KB925257) (Important) :: replaced with MS07-023 :: call :download http://download.microsoft.com/download/f/d/4/fd440961-620a-4e16-a997-190dcf4e0376/office2003-KB925257-FullFile-ENU.exe :: http://support.microsoft.com/kb/924085 : MS07-003: Security Update for Outlook 2003 (KB924085) (Important) call :download http://download.microsoft.com/download/e/a/a/eaa3d1d8-ed6b-4568-bc28-bf6b71c6eacc/office2003-KB924085-FullFile-ENU.exe :: http://support.microsoft.com/kb/920813 : MS07-013: Security Update for Office 2003 (KB920813) (Important) call :download http://download.microsoft.com/download/b/e/e/bee34d4d-704a-43e0-830f-306fcabbfa34/office2003-KB920813-FullFile-ENU.exe :: http://support.microsoft.com/kb/929057 : MS07-014: Security Update for Word 2003 (KB929057) (Important) :: replaced with MS07-024 :: call :download http://download.microsoft.com/download/4/a/0/4a0bcc02-9b89-458b-8629-ac9da6d1e470/office2003-KB929057-FullFile-ENU.exe :: http://support.microsoft.com/kb/929064 : MS07-015: Security Update for Office 2003 (KB929064) (Important) :: replaced with MS07-025 :: call :download http://download.microsoft.com/download/1/e/9/1e99615b-adca-4722-9bc6-4069ace587d9/office2003-KB929064-FullFile-ENU.exe :: May 07 :: http://support.microsoft.com/kb/934233 : MS07-023: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (Critical) :: replaced with MS07-036 :: call :download http://download.microsoft.com/download/c/b/8/cb8cbd21-dce3-4a8e-9835-08ba30483b15/office2003-KB933666-FullFile-ENU.exe :: http://support.microsoft.com/kb/934232 : MS07-024: Vulnerabilities in Microsoft Word Could Allow Remote Code Execution (Critical) call :download http://download.microsoft.com/download/9/0/b/90b80ced-5993-42de-b810-51b79951ae2a/office2003-KB934181-FullFile-ENU.exe :: http://support.microsoft.com/kb/934873 : MS07-025: Vulnerability in Microsoft Office Could Allow Remote Code Execution (Critical) call :download http://download.microsoft.com/download/6/7/1/671fe678-8823-4477-97f2-e2701cf8ad3f/office2003-KB934180-FullFile-ENU.exe :: Jul 07 :: http://support.microsoft.com/kb/936507 : MS07-036: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (Critical) :: replaced with MS07-044 :: call :download http://download.microsoft.com/download/0/d/5/0d51c589-833e-4a54-812e-d4669dae5616/office2003-KB936507-FullFile-ENU.exe :: Aug 07 :: http://support.microsoft.com/kb/940602 : MS07-044: Security Update for Excel 2003 (Critical) call :download http://download.microsoft.com/download/9/d/3/9d38372f-bb88-410e-85a3-a21415ee9fc7/office2003-KB940602-FullFile-ENU.exe set fixes_applied= set XPSP2_REG=%temp%\office_2003_post_sp2_hotfixes.reg del /f "%XPSP2_REG%" >nul 2>nul regedit /e "%XPSP2_REG%" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products" set e=%errorlevel% if not exist "%XPSP2_REG%" ( echo Can't export "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products" to echo "%XPSP2_REG%" echo regedit returned error %e% goto :eof ) for %%A in ("%hotfixdir%\office2003SP*.exe") do ( for /f "delims=KB- tokens=2" %%B in ("~%%~nA~") do ( call :integrate "%%~dpnxA" "%%B" ) ) for %%A in ("%hotfixdir%\office2003-*.exe") do ( for /f "delims=- tokens=2" %%B in ("~%%~nA~") do ( call :integrate "%%~dpnxA" "%%B" ) ) ::del /f "%XPSP2_REG%" echo. if "%fixes_applied%" == "" ( echo All fixes have already been applied to %SystemRoot% ) else ( echo The following fixes have been applied to %SystemRoot%: echo %fixes_applied% set /p REPLY=Do you want to reboot now [Y,N] ? if /i "%reply%" == "y" ( shutdown -r -t 20 -c "Applied hotfixes %fixes_applied%" ) ) echo. goto :eof :integrate set A=%~1 set B=%~2 copy /y NUL NUL >NUL 2>NUL find "%B%" "%XPSP2_REG%" >NUL 2>NUL if not errorlevel 1 goto :eof echo Integrating %A%... copy /y NUL NUL >NUL 2>NUL start "Integrating %A%..." /wait "%A%" %options% set e=%errorlevel% :: 3010 = reboot required if not "!e!" == "3010" ( if errorlevel 1 ( echo %A% returned error %errorlevel% goto :eof ) ) set fixes_applied=%fixes_applied% %B% goto :eof :download for /f "delims=/ tokens=8" %%a in ("%1") do set exe=%%a set rv=%exe% if "%rv%" == "" ( echo Unable to parse the filename from "%1" goto :eof ) if exist "%hotfixdir%\%rv%" goto :eof %DOWNLOADER% %1 :loop cls echo.|time|find "current" echo Waiting for "%hotfixdir%\%rv%" to appear echo or press [Ctrl]-[Break] to abort... ping -w 1000 -n 2 127.0.0.1 >nul 2>nul if not exist "%hotfixdir%\%rv%" goto :loop goto :eof