aSa Posted October 23, 2009 Share Posted October 23, 2009 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 ExplicitDim xml,nodes,itemDim report,Severities,SeveritiesArrayIf 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 reportIf 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 Ifset 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").textnext WScript.Echo "====================================================" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now