clievers Site Admin
Joined: 07 Sep 2005 Posts: 164
|
Posted: Tue Apr 07, 2009 12:42 pm Post subject: Auto Update Client script to force Update Detection (WSUS) |
|
|
In testing WSUS on Windows Server 2008, I had my test Client that I needed to keep checking for updates, and not wait for it to do it on it's own (or else that could have taken a really long time).
So I came across a page on WSUS: Script to Force the Update Detection from Automatic Update Client (WUA) for updates on WSUS Server. This seemed to work so I had to post it to my forums in case this site goes down, so I can get the script code again.
Just copy the code and save it to a "AUForceUpdate.cmd" file. Double click this file to run it.
| Code: | @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 |
_________________ Let's all play nice!!
http://www.cory.lievers.ca |
|