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

This tip was submitted to the SearchWin2000.com 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 

    Requires Free Membership to View

http://www.microsoft.com/technet/treeview/defa 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 ftp://ftp.microsoft.com/reskit/win20000/ REM More reading on qchain.exe at http://search.microsoft.com/search/results.aspx?st=b&qu=qchain.exe&view=en-us 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 first published in September 2003

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.