Looking for a FREE portable/command line program to list missing MS Updates

This would require more work but you could look into WSUS and see how they detect updates. I believe they actually have a list of updates that are available vs what is installed. WSUS only uses CMD and VBS, all readily available on every windows machine.

The only thing I don't know is licensing, if they publish the code as open source, or if you can see enough by looking at the scripts to see what they are doing, or at the very least see what registry keys they are pulling to get a list of updates that are installed.

When using WSUS there is a point where it actually tells you it is searching/checking which updates are available. But it isn't the fastest. But is silent.
 
My request was for the opposite ... to obtain a list of updates not installed.
Allan, that script scans for missing updates and automatically installs them. It can easily be adapted to output the missing updates to a text file or display them in a message box. Here is an example (could use a bit of tweaking):
Code:
<UVKCommandsScript>
<AutoItScript>
#RequireAdmin
$updateSession = ObjCreate("Microsoft.Update.Session")
$updateSession.ClientApplicationID = "UVK Script example"

$updateSearcher = $updateSession.CreateUpdateSearcher()

ProgressOn("Windows updater", "Searching for updates...")


$searchResult = $updateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0")

$updateCount = $searchResult.Updates.Count
If $updateCount = 0 Then
    ProgressOff()
    MsgBox(0,"Windows updater", "There are no applicable updates.")
    Exit 1
EndIf

ProgressSet(0, "Creating list of available updates...")

$output_text = 'List of missing updates:' & @CRLF & @CRLF
For $i = 0 To $updateCount-1
    $update = $searchResult.Updates.Item($i)
    $output_text &= $i & ': ' & $update.Title & @CRLF
Next
ProgressOff()
$hfile = FileOpen(@DesktopDir & '\MissingUpdates.txt', 34)
FileWrite($hfile, $output_text)
FileClose($hfile)
MsgBox(0, 'Missing Updates', $output_text)

Save the code above to a UVK script (.uvk), and you should be good to go.
 
Last edited:
Back
Top