Jump to content

MBSACLI report and download URLs to localized patches?


Recommended Posts

Hi folks,

I've been experimenting with a simple vbs scripts that would use MBSACLI to create a XML report of missing updates. Thats the easier part. I need also to download several localized versions of the patches (enu + few other languages), so does anyone know a way to get/generate the download URLs for those localised versions?

A simple version to start working with is here:

Option Explicit
Dim xml,nodes,item
Dim report,Severities,SeveritiesArray

If WScript.Arguments.Count > 0 Then
report = WScript.Arguments(0)
Else
report = "C:\Documents and Settings\Administrator\My Documents\MBSA_testreport.xml"
end If

Set xml = CreateObject("MSXML2.DOMDocument")
xml.async = False

xml.Load report

If xml.parseError.errorCode Then
Wscript.Echo "Parse Error: " & vbCRLF & _
" Reason = " & xml.parseError.reason & vbCRLF & _
" Line = " & xml.parseError.line & vbCRLF & _
" linePos = " & xml.parseError.linePos & vbCRLF & _
" srcText = " & xml.parseError.srcText & vbCRLF & _
" ErrorCode = " & xml.parseError.ErrorCode & vbCRLF

WScript.quit
End If

set nodes = xml.SelectNodes("//UpdateData[@IsInstalled='false']")

Severities = "No severity rating,Low severity,Moderate severity,Important severity,Critical severity"
SeveritiesArray = Split(Severities, ",")

for each item in nodes
WScript.Echo "===================================================="
WScript.Echo "ITEM: " & item.Attributes.GetNamedItem("BulletinID").text & ": " & item.SelectSingleNode("Title").text
WScript.Echo " " & SeveritiesArray(item.GetAttribute("Severity")) & " (" & item.GetAttribute("Severity") & ")"
WScript.Echo " " & item.SelectSingleNode("References/DownloadURL").text
next
WScript.Echo "===================================================="

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...