I found my answer on The Scripting Guy website. I adopted the solution
located at:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept05/hey0930.mspx
The article referenced above looks for a specific patch. I modified the VBS
script to look for any and all patches. My final solution is this:
Wscript.echo "Script is running..."
Set objSession = CreateObject("Microsoft.Update.Session")
Wscript.echo "ObjectSession created."
Set objSearcher = objSession.CreateUpdateSearcher
Wscript.echo "objSearcher has been set."
Set objResults = objSearcher.Search("Type='Software'")
Wscript.echo "objResults has been set."
Set colUpdates = objResults.Updates
Wscript.echo "colUpdates has been set."
Wscript.echo "Starting loop."
For i = 0 to colUpdates.Count - 1
Wscript.echo ("Number " & i & ": " & colUpdates.Item(i).Title)
Next
I execute the script from a command line and redirect the output to a text
file as indicated below:
cscript <scriptname.vbs > outfile.txt
On my laptop, I was able to see that 142 patches had been applied.
Hope this helps others....
Rich