Is it possible to install windows updates from the command-line? The graphical update tool doesn't seem to work so well in Windows 7. Sometimes it does, sometimes it doesn't... My problem is that I can't see any updates when I click to see the details list. So when there are updates that are not checked off by default, I can't install them...

So, is there an other way I can get those installed?

link|improve this question

74% accept rate
feedback

4 Answers

up vote 7 down vote accepted

Not sure about Windows 7, but with XP/Vista, you could run the following command to detect and download updates:

wuauclt /detectnow /reportnow

If you have issues getting it to work, check out the WSUS Wiki.

Otherwise if you have a specific update that you want, just download from the Microsoft website. If there's some problem preventing you from installing, that's the best way to find out, because the Windows Update logs are godawful to deal with.

link|improve this answer
feedback

If you have to patch Windows operating systems, especailly after fresh installs, take a serious look at Offline Updater: http://www.h-online.com/security/Offline-Update--/features/112953

It uses scripts to download all the patches you suggest (so Win2000, Win XP, Win 2003, Vista and Win2008 32 and 64 bit where appropriate), multi language, service packs, .NET frameworks, and Office patches (XP, 2000, 2003, 2007).

Once you have them all downloaded, you just update every patch Tuesday, and get only the changes. Though it does get the catalouges and they are getting longer every day (many megs now per OS/Office rev).

Once you have the files on your local machine downloaded, there is a script to make CD/DVD images of them (it will this automatically for DVD images per OS now if you would like).

What I do is use a 4GB SD memory card, in an SD card reader that honours the write protect tab. I used to use 2GB cards, but I can just barely fit Win XP and most of the Office builds on it now, so I moved on to 4GB cards.

Thus when troubleshooting a machine, I trust inserting this formerly writable device into a untrusted, possibly virus infected machine (since I know nothing about it, I assume it is infected) knowing my device is write protected.

Thus I can patch it up to date as a first step.

If you use the autorun, or launch the executable on the device (key, external HD, CD, DVD, wherever you wrote it) it starts a script that uses the Windows Update service on the local machine to apply all the updates, but instead of going across the wire to download them it just uses the local copy.

Thus it may still take 1+ hours to update a WinXP machine to the latest SP and patches, but there is zero network traffic along the way, and you can do it with the Ethernet cable unplugged entirely.

Amazingly useful tool!

Should not run afoul of Microsoft, like the AutoUpdate guys were, who were pre building a patch CD, that distributed the CD image. This tool updates scripts, and you have to go get all the patches on your licensed Windows workstation.

link|improve this answer
feedback

I do not believe so, Windows Update requires some ActiveX and other integration with Internet Explorer to work properly.

Since Windows 7 is still barely a release candidate, you should expect these kinds of bugs.

Might be wise to submit the specific bug you are having to the dev team if you are a member of MSDN.

link|improve this answer
yeah, I know. Already have filed a bug at MSDN. Just looking for an alternative method until it is fixed =) – Svish May 20 '09 at 4:05
feedback

You could use a vbscript to check for, download and install updates. I often use a modified version of this script for manual patching of Windows Server 2008 Core servers.

It seems to work like a charm for that but I've not tested it under Windows 7 of course. There is also a link to another article for targeting a specific update if needed.

After a quick look I also found this third party application that also uses the update API, but with some more options (though requiring you to trust third party code).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.