MSFN Forum: how to find ou wich hotfixes are installed? - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

how to find ou wich hotfixes are installed? want to create s.th like a wsus Rate Topic: -----

#21 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,020
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 10 July 2005 - 03:45 PM

Here is a VBS script that list the updates installed on the computer
It Is a Modified Version of this Hey, Scripting Guy! script.
Save As A YOURNAME.vbs

Quote


Dim Description, Font1, GbB1, InTA, Table1, Table2, TD
Set objSession = CreateObject("Microsoft.Update.Session")
Set objSearcher = objSession.CreateUpdateSearcher
intHistoryCount = objSearcher.GetTotalHistoryCount
Table1 = "<Table Bgcolor=""#ededed"" width=""525"">"
Table2 = "<Table Bgcolor=""#dddddd"" width=""525"">"
TD = TD = "<TD STYLE=""font:8.75pt Palatino Linotype"" Width=""515"">"
Font1 = "<Font Style=""Arial"" font-weight""Bold-Italic"" "
Set GrB1 = WScript.CreateObject("InternetExplorer.Application")
    GrB1.Navigate "Local:ListUpdates" 
    GrB1.ToolBar = 0
    GrB1.StatusBar = 0
    GrB1.Width=600
    GrB1.Height = 405
    GrB1.Left = 375
    GrB1.Top = 125
    GrB1.Visible = 1
Set Act = CreateObject("Wscript.Shell")
InTA = 1- 1
Set colHistory = objSearcher.QueryHistory(1, intHistoryCount)

   
For Each objEntry in colHistory
InTA = InTA + 1
GrB1.Document.Body.InnerHTML = "<center>" & Table2 & Font1 &  "Color=""#c1c1c1""> Gsm List Updates " &_
"<center>" & Table2 & Font1 & "Color=""Green""><center>" &objEntry.Title & "</Table></TD>"&_
"<center>" & Table1 & "<TD STYLE=""font:9.75pt Palatino Linotype"" Width=""440"">" &_
"<TD STYLE=""font:9.75pt Palatino Linotype"" Width=""440"">" & Font1 &  "Color=""#000ff""> This Was Installed On : " & objEntry.Date & "</Table></TD>" &_
"<center>" & Table2 & Font1 &  "Color=""#0000f"">" &  objEntry.Description & "</Table></TD>" &_
  "<center>" & Table1 & Font1 &  "Color=""Red"">How Many Updates Installed : " &  Inta & "</Table></TD>"
  WScript.Sleep 5500

Next
GrB1.Document.Body.InnerHTML ="<center>" & Table2 & Font1 &  "Color=""#c1c1c1""> Completed The List Updates "
WScript.Sleep 5500
GrB1.quit
This Searches For The Names In The Array
Blue Text Is The Array
Save As A YOURNAME.vbs

Quote



Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim Act,Fso,INTA,SD,strComputer,strKB,TheFile,V,Report
Set Act = CreateObject("Wscript.shell")
Set Fso = CreateObject("Scripting.FileSystemObject")
''''''''''''''''''''''''''''''' Location For The Script ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
SD = Act.ExpandEnvironmentStrings("%SystemDrive%")
''''''''''''''''''''''''''''''' Misc Varibles For The Script '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Report = ("ListUpdate.Txt")
V = vbCrLf
strComputer = "."
''''''''''''''''''''''''''''''' Arrays For The Scrpt '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim KbL : KbL = Array (_
"KB835935", "KB887742", "KB885626", "KB873339", "KB885835", "KB834707",_
"KB885836", "KB886185", "KB890175", "KB873333", "KB888113", "KB891781",_
"KB888302", "KB883939", "KB890046", "KB893066", "KB896358", "KB896422",_
"KB896428", "KB890047", "KB890859", "KB890923")
INTA = 1-1
If Fso.FileExists(Report) Then Fso.DeleteFile(Report) End If
  For Each StrKB In KbL
  Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
  Set colFiles = objWMIService.ExecQuery("Select * from CIM_DataFile Where FileName = '" & StrKB & "'")
     INTA = INTA + 1
  If colFiles.Count = 0 Then 
   Act.Popup "Missing", 3, "Missing", 0 + 32
  end If
    For Each objFile in colFiles
   FName = Ucase(objFile.FileName)
   Kbname = Ucase(objFile.FileName & "." & objFile.Extension)
   KbPath = UCase(objFile.Drive & objFile.Path)
   TheFile = KbPath & Kbname
Set WF = fso.OpenTextFile( Report, ForAppending, 2, true) 
WF.WriteLine "'<-- The Start Time Of The Script " & Time & " -->How Many Times The Loop ran = " & Inta
WF.WriteLine "The Name of The Update : " & FName
WF.WriteLine "-----------------------------------------------------------"
Wf.WriteLine "The Download Location : " & V & TheFile
WF.WriteLine "'<-- The End Of The Search Time Of The Script " & Now & " -->" & V
Wf.Close
     Next
   Next
Act.Run(Report),1,True
Gsm = Act.Popup ("Did you want to keep the Report" &_
V & "Yes To Keep The Report" & V & "No To Keep The Report" &_
V &  "There Is A 15 Second Time Out."& V & "Defualt Time Out Action Is" &_
V & "To delete The Reoprt", 15, "Keep Or Delete", 4 + 32)
If Gsm = 6 Then
Act.Popup "Keeping The Report End",3,"Keep The Report", 0 + 32
End If
If Gsm = 7 Then
Fso.DeleteFile(Report)
Act.Popup "Deleted The Report", 3, "Delete The Report", 0 + 32
End If
If Gsm = -1 Then
Fso.DeleteFile(Report)
Act.Popup "Deleted The Report", 3, "Delete The Report", 0 + 32
End If


I Fixed The Error Sorry It Was Just A Extra & In The Script

This post has been edited by gunsmokingman: 11 July 2005 - 05:44 AM



#22 User is offline   mouvda 

  • Newbie
  • Group: Members
  • Posts: 25
  • Joined: 27-March 04
  • OS:XP Pro x86
  • Country: Country Flag

  Posted 10 July 2005 - 03:58 PM

if you want to grab your hotfixes, you can use wutool (freeware).

it can grab them when you're updating via windowsupdate and it test switches of hotfixes.

http://ovacia.amicom...ownload_eng.htm

#23 User is offline   Takeshi 

  • Legitchecking...
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,107
  • Joined: 09-September 04

Posted 10 July 2005 - 08:27 PM

The 2nd vbs returns a syntax error when I try it:

Line: 37
Char: 56
Code: 800A03EA

As discussed in a previous thread, it's also possible to query the registry for the hotfixes installed.

#24 User is offline   Third3ye 

  • Group: Members
  • Posts: 6
  • Joined: 13-June 05

Posted 22 July 2005 - 06:32 PM

I have a similar problem. But I don't want to compare my computer to the install I've produced with nLite. I want to check the unburned cd (files that is) to see what kind of hotfixes I'm going to be putting on the install CD.

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy