Welcome to TechNet Blogs Sign in | Join | Help

Canadian IT Professionals

Connecting Canadian IT pros.. It's all about Technology and a whole lot more!

News



  • Sharing of thoughts and information is what blogging is all about. This way we can learn from each other. Post A Comment!

    These postings are provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

    Resident Bloggers

    Rick Claus
    IT Pro Advisor
    Connect with Rick


    Rodney Buike
    IT Pro Advisor
    Connect with Rodney


    Damir Bersinic
    IT Pro Advisor
    Connect with Damir



Another great utility for WSUS administrator ... ForceUpdate.bat

I used this utility on the last tour to “kickstart” the WSUS client on my Exchange box to register and download updated with my WSUS server.  If you search the web, you will see a number of articles talking about kickstarting the auto update client – I like this one from my friend Rod at “the Lazy Admin” blog… He talks in the comments section on how to get the process to work with Windows 2000 based systems…

I found out about the process when I was asked to speak at the Ottawa IT Security Summit last spring. I was presenting on Microsoft Update technologies and I wanted to have a quick way on getting clients to check for approved updates.  I started with the source (support.microsoft.com) and did some searches to find this little gem created and posted under the Community Solutions section… It was documented and written up by Mohammed Athif Khaleel MVP on his blog in this article…  Here is the quick and dirty batch file.

====================================================
@echo off
Echo This batch file will Force the Update Detection from the AU client:
Echo 1. Stops the Automatic Updates Service (wuauserv)
Echo 2. Deletes the LastWaitTimeout registry key (if it exists)
Echo 3. Deletes the DetectionStartTime registry key (if it exists)
Echo 4. Deletes the NextDetectionTime registry key (if it exists)
Echo 5. Restart the Automatic Updates Service (wuauserv)
Echo 6. Force the detection
Pause
@echo on
net stop wuauserv
REG DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v LastWaitTimeout /f
REG DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v DetectionStartTime /f
Reg Delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v NextDetectionTime /f
net start wuauserv
wuauclt /detectnow
@echo off
Echo This AU client will now check for the Updates on the Local WSUS Server.
Pause
====================================================

I’ve taken this code and then removed the on screen prompts and pause statements. You will get error messages about keys not existing – this is normal, since the keys may not exist.  Don’t Worry – the process works despite the on-screen error messages. 

I saved my updated file as ForceUpdate.cmd and then make it available to the systems that need it.  It can be run manually or even deployed using SMS as a package if you want.  Great work Mohammed!

Posted: Friday, April 07, 2006 10:17 AM by rclaus

Comments

Life of an IT Pro Advisor @ Microsoft Canada said:

After getting questions from a number of people on the recent tour on how I used a “cattle prod”...
# April 7, 2006 10:23 AM

PatchAholic...The WSUS Blog! said:

AUForceUpdate.cmd
# April 8, 2006 8:21 AM
New Comments to this post are disabled
Page view tracker