I'm specifically interested in Windows 2000/XP, but Vista/7 would be interesting too (if different).
I was thinking along the lines of task scheduling a batch file or equivalent on a daily basis.
EDIT: Sorry, I should have provided more info. The question pertains to 10 machines which I manually apply updates. I don't want to install the updates programatically, but just find out if there are updates ready to download/install (i.e. the update shield icon in the system tray is indicating this) using a batch or script. Thanks.
In regards to what mdsindzeleta said - going about this programatically probably isn't the best solution. I would use the features built into Windows XP to download and install updates. I'm assuming that Vista has similar features.
I believe Windows updates are downloaded using the BITS service. You could use Bitsadmin.exe found in the Windows Support Tools. From the command line you can run bitsadmin.exe /list and you can see the status of BITS jobs. (i.e. download progress, job name, job status)
You could use
WUApiLib
:Windows SUS works very well for several machines on a network.
In the end, Windows SUS wasn't an option, so I'm using the following in a batch file conjunction with ActiveState ActivePerl (recommended):
perl -nle "print $_ if m/updates detected/i" < c:\Windows\WindowsUpdate.log
This might be crude or dirty, and might break in future, but it currently does what I need.
Thanks for all the ideas.
The "easiest" way to tell is to setup Windows Updates to occur nightly and download the updates if available which then puts the update shield icon in the system tray. Just glance at the tray to see if the icon is present.
You could also setup Windows to check nightly for the updates, then download and install them at a specified time.