Re: Installing multiple hotfixes

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Arek Iskra [MVP] (NoSpam_arek_at_arekiskra.com)
Date: 10/14/04


Date: Thu, 14 Oct 2004 20:33:07 +0800

I can't see anything wrong with your simple script. It should run without
problem. If I may suggest something, you could consider using qchain.exe to
rollout multiple patches which require reboot in one go.

-- 
Arek Iskra
MVP for Windows Server - Software Distribution
"Monty" <montysl@nospam.hotmail.com> wrote in message 
news:u$zDA9VsEHA.3200@TK2MSFTNGP14.phx.gbl...
> This does not look like rocket science and I read all of the KB articles 
> but
> cannot get it to work. I have tried different paths also. I am probably 
> just
> missing something very plain but it has been a long day of installing
> hotfixes. Thanks in advance. My syntax is as follows:
>
> @ECHO OFF
> SETLOCAL
> REM Location of updates to install
> SET PathtoFixes=E:
> REM Flag used to determine if a restart is required, initialize to 0
> SET Reboot_Needed=0
> %PathtoFixes%\WindowsServer2003-KB824145-x86-ENU.exe /Z /U
> IF ERRORLEVEL 3010 SET Reboot_Needed=1
> %PathtoFixes%\WindowsServer2003-KB840987-x86-enu.EXE /Z /U
> IF ERRORLEVEL 3010 SET Reboot_Needed=1
> %PathtoFixes%\WindowsServer2003-KB841533-x86-enu.EXE /Z /U
> IF ERRORLEVEL 3010 SET Reboot_Needed=1
> %PathtoFixes%\WindowsServer2003-KB883935-x86-enu.EXE /Z /U
> IF ERRORLEVEL 3010 SET Reboot_Needed=1
> %PathtoFixes%\WindowsServer2003-KB834707-x86-enu.EXE /Z /U
> IF ERRORLEVEL 3010 SET Reboot_Needed=1
> %PathtoFixes%\WindowsServer2003-KB841356-x86-enu.EXE /Z /U
> IF ERRORLEVEL 3010 SET Reboot_Needed=1
> %PathtoFixes%\WindowsServer2003-KB873376-x86-enu.EXE /Z /U
> IF ERRORLEVEL 3010 SET Reboot_Needed=1
> %PathtoFixes%\WindowsServer2003-KB885881-x86-enu.EXE /Z /U
> IF ERRORLEVEL 3010 SET Reboot_Needed=1
> REM force restart here
> IF %Reboot_Needed%.==1. Shutdown /r
>
> 


Relevant Pages

  • Re: xcopy errorlevel problem in script
    ... echo/errorlevel is %errorlevel% ... xcopy process works when there are files/folders to copy but does not change ... REM %2 = target computer name & path ... if errorlevel 5 goto error ...
    (microsoft.public.windows.server.scripting)
  • Re: Return code from WshShell.Exec
    ... The ERRORLEVEL at the end of your batch procedure IS zero, ... just like ECHO and the external FIND ... Then add an ECHO %ERRORLEVEL% or a REM. ...
    (microsoft.public.scripting.vbscript)
  • Re: Return code from WshShell.Exec
    ... The ERRORLEVEL at the end of your batch procedure IS zero, ... just like ECHO and the external FIND ... Then add an ECHO %ERRORLEVEL% or a REM. ...
    (microsoft.public.scripting.wsh)
  • Installing multiple hotfixes
    ... missing something very plain but it has been a long day of installing ... REM Flag used to determine if a restart is required, ... IF ERRORLEVEL 3010 SET Reboot_Needed=1 ... REM force restart here ...
    (microsoft.public.windows.server.general)
  • Re: msdev - command line - stderr
    ... to wade through miles of log files. ... I believe the exit code from msdev would be 0 if build succeeded, ... with "IF ERRORLEVEL" statement. ... REM res>=1 ...
    (microsoft.public.vc.language)