Problem solve Get help with specific problems with your technologies, process and projects.

Batch file that makes hotfixes easy -- and only one reboot!

With this process you can insure all your servers are running your last release of hotfixes within 30 minutes per server with only one reboot.

This tip was submitted to the tip exchange by member Aneil Singh. Please let other users know...

how useful it is by rating it below.

Are you uncomfortable using Automatic Update for your Microsoft production server hotfixes? Or are you unable to use it due to firewall rules and security? Then testing your updates in QA before deploying to production servers is always a wise idea.

With this process you can insure all your servers are running your last release of hotfixes within 30 minutes per server with only one reboot. This process will save you critical downtime -- and that's always a big plus with management!

First, log into the server you are going to apply all the hotfixes to and then locate your batch file on your network and execute. The batch file below speaks for itself.

 REM This batch file copies hotfixes from a software share mapped to S: REM Every month I update the directory in S:OS2k_patchesHotfixes"month""with_current_hotfixes" REM Hotfixes obtained from ult.asp?url=/technet/security/current.asp REM will only work with the log file name format from Microsoft -- i.e. Windows2000-KB823980-x86-ENU.exe REM long file name is format is due to the -z -m options when running the hotfixes REM Restart.vbs obtain from REM More reading on qchain.exe at REM Map network drive net use s: machine_nameserver_share REM changes directory to; pushd S:OS2k_patchesHotfixes2003-july REM copy current hotfixes to; xcopy *.* C:temphotfixes2003-july*.* /S/E/I/H/C/R/Y popd REM executes hotfixes in directory pushd C:temphotfixes2003-july if not exist runfixes me runfixes for %%F in (*.exe) do ( %%F -z -m move %%F runfixes ) popd REM Qchain organizes the hotfixes for the latest version of files xcopy s:OS2k_patchesHotfixesqchain.exe C:temphotfixes*.* /Y pushd C:temphotfixes REM Executes qchain and creates log in know dir qchain.exe c:hotfixes.log REM automatic restart, can remove and perform the restart manually xcopy s:OS2k_patchesrestart.vbs C:temp*.* /Y cscript c:temprestart.vbs /S localhost /R /F popd REM Cleans up dirs rmdir /S/Q c:temphotfixes

This was last published in September 2003

Dig Deeper on Windows Server and Network Security



Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.