albator Posted April 7, 2015 Share Posted April 7, 2015 Hi, Does someone know how I could get all the kb but only for a specific editions of windows 7 ? I know how to integrate and slipstream windows 7 pro with WUD. Also, do you guys also integrate the non security updates ? I never did it and never had a problemwith home pc and laptops. Thank for your help. Link to comment Share on other sites More sharing options...
gunsmokingman Posted April 9, 2015 Share Posted April 9, 2015 Try this VBS script that produces a HTA with a list of Missing and Install Updates, it tries to make a download link from Microsoft site.kbList.vbsOption Explicit'-> Makes ShorterDim Vb :Vb = vbCrLf'-> Objects For Script Run TimeDim Act, Fso, CName Set Act = CreateObject("Wscript.Shell") Set Fso = CreateObject("Scripting.FileSystemObject") CName = Act.ExpandEnvironmentStrings("%ComputerName%")'-> Ask If You Want To Use Script Dim A1 :A1 = Act.Popup( _ " Would You Like To Run The Report Updates Script?" & Vb & _ "The Script Will Take Approx 5 Minutes To Be Done." & Vb & _ "If Nothing Is Selected This Will Self Close In 7" & Vb & _ "Seconds And Do Nothing", 7, "Search Updates",4132) If A1 = 7 Or A1 = -1 Then WScript.Quit(1) End If '-> Varibles For Hta OutputDim Hta :Hta = Act.SpecialFolders("Desktop") & "\" & CName & "_KbInfo.hta"Dim Ar :Ar = Chr(160) & Chr(187) & Chr(160)Dim Al :Al = Chr(160) & Chr(171) & Chr(160)Dim Ts'-> Search Objects And VariblesDim SearchResult, Update, UpDateSearcher,UpDateSession Set UpDateSession = CreateObject("Microsoft.Update.Session") Set UpDateSearcher = UpDateSession.CreateUpDateSearcher() Set SearchResult = UpDateSearcher.Search("Type='Software'")'-> Varibles For Count, Loop, Updates Dim C1, I, Kb_C, Kb_M, M1, V1, V2 :C1=0 :M1=0 '-> Loop To List Install And Missing Updates For I = 0 To SearchResult.Updates.Count-1 Set Update = SearchResult.Updates.Item(I) If Update.IsInstalled Then C1 = C1 + 1 : V1 = C1 Kb_C = Kb_C & C1 & "=-=" & Update.Title & "=-=" & Update.Description & Vb Else M1 = M1 + 1 : V2 = M1 Kb_M = Kb_M & M1 & "=-=" & Update.Title & "=-=" & Update.Description & Vb End If Next'-> If There Are No Missing Updates If M1 = 0 Then V2 = "000" Kb_M = "000=-=No Updates Found=-=There Was No Updates Missing" & Vb End If'-> If There Are No Installed Updates If C1 = 0 Then V1 = "000" Kb_C = "000=-=No Updates Found Installed=-=There Was No Updates Found Installed." & Vb End If'-> Build The Hta Report Set TS = Fso.CreateTextFile(Hta) TS.WriteLine "<TITLE>" & CName & "</TITLE>" & Vb & _ "<STYLE Type=""text/css"">" & Vb & _ " Body{Font-Size:9.25pt;Font-Weight:Bold;" & Vb & _ " Font-Family:Segoe Ui,Arial,Tahoma;" & Vb & _ " Color:#000063;BackGround-Color:#fdf7f1;" & Vb & _ " Margin-Top:5;Margin-Bottom:5;Margin-Left:4;Margin-Right:4;" & Vb & _ " Padding-Top:5;Padding-Bottom:5;Padding-Left:4;Padding-Right:4;" & Vb & _ " Text-Align:Left;Vertical-Align:Top;" & Vb & _ " Border-Top:2px Solid #cbc7c3;Border-Bottom:3px Solid #a6a29e;" & Vb & _ " Border-Left:2px Solid #bcb8b4;Border-Right:3px Solid #b2aeaa;}" & Vb & _ " TD.Tx1{Font-Size:8.25pt;Color:#004747;Font-Weight:Bold;Padding-Left:3;Width:70pt;}" & Vb & _ " TD.Tx2{Font-Size:8.25pt;Color:#006969;Font-Weight:Bold;Width:105pt;}" & Vb & _ " P.D1{Font-Size:8.25pt;Color:#1e1e1e;Width:99%;Padding-Left:1;Margin:1pt;}" & Vb & _ " FONT.F1{Font-Size:8.25pt;Color:#004400;Padding-Left:3;Width:17pt;}" & Vb & _ " FONT.F2{Font-Size:8.25pt;Font-Weight:Bold;Color:#000063;Padding-Left:3;}" & Vb & _ "</STYLE>" & Vb & _ "<SCRIPT LANGUAGE='JScript'>window.resizeTo (725,425), window.moveTo (210,175);</SCRIPT>" Ts.WriteLine "<BODY Link='#003535' vLink='#007575' aLink='#003535'>" & Vb & _ "<TABLE ALIGN='CENTER'><TD CLASS='Tx1'>Scan Date Time</TD><TD CLASS='Tx2'>" & _ Ar & Now & "</TD></TABLE>" & Vb & _ "<TABLE ALIGN='CENTER'><TD CLASS='Tx1'>Computer Name</TD><TD CLASS='Tx2'>" & _ Ar & CName & "</TD></TABLE>" & Vb & _ "<TABLE ALIGN='CENTER'><TD CLASS='Tx1'>Install KB</TD><TD CLASS='Tx2'>" & _ Ar & Adz(V1) & "</TD></TABLE>" & Vb & _ "<TABLE ALIGN='CENTER'><TD CLASS='Tx1'>Missing KB</TD><TD CLASS='Tx2'>" & _ Ar & Adz(V2) & "</TD></TABLE><HR Width=97%>" Ts.WriteLine "<TABLE Align='Center'>List Of Missing Updates</TABLE><HR Width=99%>" SortInfo(Kb_M) Ts.WriteLine "<TABLE Align='Center'>List Of Installed Updates</TABLE><HR Width=99%>" SortInfo(Kb_C) Ts.Close'-> Run The Hta Act.Run("mshta.exe " & Chr(34) & Hta & Chr(34)),1,True'/-> Keep Or Delete The Hta Report If MsgBox("Did You Want To Keep The HTA Update Report?" & Vb & _ "Yes To Keep The Hta, No To Delete The Hta.",4132,"Keep Or Delete") = 7 Then Fso.DeleteFile Hta, True End If'-> Function Sort The Info For Display In The Hta Function SortInfo(Arg) Dim Obj, S1, V For Each Obj In Split(Arg,Vb) If Not Obj = "" Then V = Split(Obj,"=-=") S1= Right(V(1),11) If InStr(S1,"(") Then S1 = Replace(S1,"(","") If InStr(S1,")") Then S1 = Replace(S1,")","") If InStr(S1,"-") Then S1 = Replace(S1,"-","") If InStr(S1," ") Then S1 = Replace(S1," ","")'-> Sort The Info For Links And None links If LCase(Left(S1,2)) = "kb" Then Ts.WriteLine "<FONT Class='F1'>" & Al & Adz(V(0)) & Ar & "</FONT>" & Vb & _ "<FONT Class='F2'>" & V(1) & "</FONT>" & Vb &_ "<P Class='D1'> " & V(2) & "</DIV>" & Vb & _ "<DIV ALIGN='CENTER'>" & Vb & _ "<A HREF='http://www.microsoft.com/downloads/results.aspx?pocId=&freetext=" & _ S1 &"&DisplayLang='>" & S1 & " Information</A></DIV><HR Width=99%>" & Vb & Vb Else Ts.WriteLine "<FONT Class='F1'>" & Al & V(0) & Ar & "</FONT>" & Vb &_ "<FONT Class='F2'>" & V(1) & "</FONT>" & Vb &_ "<P Class='D1'> " & V(2) & "</DIV><HR Width=99%>" & Vb & Vb End If End If Next End Function '-> Add Zero To A Number Function Adz(N) If Len(N) = 1 Then N = "00" & N If Len(N) = 2 Then N = "0" & N Adz = N End FunctionRename KbList.vbs.txt to KbList.vbs to make activeKbList.vbs.txt 1 Link to comment Share on other sites More sharing options...
albator Posted April 10, 2015 Author Share Posted April 10, 2015 Thank 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