Jump to content

Force WSUS client to sync


Recommended Posts

I need to find a way to force an XP machine to check in with WSUS, download any needed updates, install them right away, and restart if necessary.

Using wuauclt.exe /detectnow, seems to cause it to check in and download needed updates, but it doesn't cause them to install. The GPO is set to make computers wait until late at night to install and restart (which needs to stay that way for normal updates on existing computers), but when I apply a fresh image to a machine, I want to have the updates install and restart right away. Updates will install automatically if I wait overnight, but I in the case of a fresh image, I don't want to wait.

I plan to running the script locally as an administrator.

Right now the process is manual: go to windows update, click through until it starts downloading, wait, click restart when everything's installed. The goal is to either automate the clicking, or preferably find/develop a command line option like "wuauclt.exe /detectnow /downloadnow /installnow /restart" or script that doesn't involve mouse clicks or send keys.

I welcome all ideas.

Thanks,

Link to comment
Share on other sites

Unfortunately I think you are stuck on this. There are only two working switches and they are /detectnow and /resetauthorization.

Granted I am not a WSUS admin, but I spent most of the other day working with ours, and he was telling me you can get it to download updates with the detectnow, but t will not install anything until the specified time.

If I am wrong, someone else please give the answer as I would like to know this too.

"Human kind cannot gain anything without first giving something in return, to obtain; something of equal value must be lost."The Help File is truly your friend.

Link to comment
Share on other sites

Unfortunately I think you are stuck on this. There are only two working switches and they are /detectnow and /resetauthorization.

Granted I am not a WSUS admin, but I spent most of the other day working with ours, and he was telling me you can get it to download updates with the detectnow, but t will not install anything until the specified time.

If I am wrong, someone else please give the answer as I would like to know this too.

Hi,

if you have proper configure Windows Updates Services, the attached vbs Script started with cscript should force your client to update.

;-))

Stefan

wsusinst.zip

Edited by 99ojo
Link to comment
Share on other sites

@Stefan

Looks good. I wasn't aware of the MS Update object. I don't know why this isn't more well known. Thanks.

http://msdn.microsoft.com/en-us/library/aa387102(VS.85).aspx

@archgriffin

well... there are a few more switches, but I don't think they're very useful. /showsettingsdialog /demoui etc.

@all

AutoIT has an excellent chm reference, and is my first choice for scripting.

MS has an adequote chm for VBscript/JScript/WSH here: http://www.microsoft.com/downloads/details...;displaylang=en VBScript is my second choice for scripting in situations where AutoIT can't be used (employer related).

I could use a similar reference for bat/cmd files and something for all the different object references, so I'm ready in case I have to use a particular language, and to help open up all the possibilities of object references. Does anyone have files or links to share?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...