Cory's Forums Forum Index Cory's Forums
Track help topics, support/issues, tips/tricks
 
 FAQFAQ   SearchSearch    MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Auto Update Client script to force Update Detection (WSUS)

 
Post new topic   Reply to topic    Cory's Forums Forum Index -> Windows
View previous topic :: View next topic  
Author Message
clievers
Site Admin


Joined: 07 Sep 2005
Posts: 164

PostPosted: Tue Apr 07, 2009 12:42 pm    Post subject: Auto Update Client script to force Update Detection (WSUS) Reply with quote

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!!
Smile
http://www.cory.lievers.ca
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cory's Forums Forum Index -> Windows All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


RSS Feed

Powered by phpBB © 2001, 2005 phpBB Group
Cory Lievers  |  Cory Lievers Blog  |  Lievers
Site5 $5 Hosting Deal