dyoung5 (14th May 2008), GrumbleDook (8th November 2008), ngreenwood (11th August 2009)
Sorry if you've seen this before, but I've certainly seen the question unanswered on here a few times.
I've found a script that will automatically download and install updates from Windows update or internal WSUS. Great for new installs!
I edited it slightly so that it keeps restarting and running until all the updates are installed and once they are installed it will intiate the next part of our build process.
The original version is here:
http://www.wsus.info/forums/index.ph...opic=7298&st=0
dyoung5 (14th May 2008), GrumbleDook (8th November 2008), ngreenwood (11th August 2009)

When it comes to network domains I always use WSUS. It makes a lot of sense, otherwise you'll be downloading the same Windows updates over the web multiple times. It's still relatively time consuming.
For standalone or offline installs, I have downloaded redistributable versions of Windows XP critical and optional updates (including Media Player 11, IE7, Remote Desktop 6, .NET Framework 1.1 + updates, .NET Framework 2.0 and .NET Framework 3.0) since XP SP2. I then created a batch file which will quietly install all updates one by one. Most are easy, although some required some googling as they use different switches.
It took me a while to create, but no doubt saves me a lot of time patching existing machines or new machines. Of course when XP SP3 arrives, I would create a slipstream disc, then create a new pack post SP3 updates.
This works with WSUS (or windows update) - all it does is automate the existing Windows Update client. It is not a collection of updates downloaded. It works with WSUS or WU makingn it 100% up to date.
The problem we had was that after XP had installed, machines would start downloading updates and then sit there until the designated install time or until I came along and selected 'Install Updates and Shutdown'. As some updates are dependant on other updates, you might need to do this 3 times.
Now, this script runs as part of our zero-admin setup. It forces the download of updates from WSUS and installs them straight away and restarts the computer for you. If you have automated the script, it can then run again, untill the computer is fully up to date. Not rocket science, I know, but something that can't be done in windows and something I've been looking for a script for for ages.

I understand what you're getting at, but within WSUS you can specify 'deadline' dates for updates, so if a client hasn't completed updating and rebooting, it will visually display a 3 or 4 minute countdown sequence to the user.
Users can then save their work and close any open applications, then reboot. I've never really had to enforce this however as WSUS installs updates quickly in my experience.
Thanks eean, will have a look tomorrow
Would be useful for new builds
It's not on that forum but I can post it if you like. It's rather crude and badly edited, with file names etc.. hard coded in, but you're welcome to it if you want.
Sure, if you don't mind. I'm at rene@w2cs.com. It's the looping code I'm trying to work out --which you have indicated you've solved.
*shamelessly resurrects old thread*
I have an issue with one or two machines not picking up updates from WSUS. They were existing machines that were reformatted.
Will this script sort that, or are there other things is should so to ensure they appear in WSUS Admin and get updates properly? thx
Probably not. The script doesn't do anything other than kick windows into running the wupdate software and monitors what the windows software does.
I assume you've tried wuauclt /detectnow
I sometimes (~10% of the time) have trouble with the script not running on new installs. The reason is that the wsus settings haven't applied properly because group policy hasn't refreshed correctly, even though I do gpupdate /force /boot as part of my build process.
A running gpupdate a second time and reboot fixes it straight away, however.
Next time you have a problem computer take a look in the registry at:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Win dows\WindowsUpdate\
If the settings aren't there that may be the problem.
Have you looked at c:\windows\windowsupdate.log
That may give some clues too.
I too am looking for a way to automate the update-reboot-update again sequence. Could you post a copy of your script or email me at grant.emsley@gmail.com so I can see how you did it?
Thanks
I would but, unfortunately, I have left the place where I was working when I wrote it and for somereason, I didn't get a copy. I'm in another country now but I might go back at xmas and retrieve my hours of labour!
thanks so much for useful info
script install
You can try to do this in a command line script with WuInstall, with the /download option.
Usually puts the downloads into the Windows\SoftwareDistribution\Download directory.
From there, you can copy them on every new machine and install them, for example with wuInstall /install.
Maybe in a future version it will also be possible to specify a certain download directory.
There are currently 2 users browsing this thread. (0 members and 2 guests)