Ahh....great....thank you. Here is an updated version of your script. I'm comparing a txt file against what is on the machine and only displaying the name and if it is installed or not installed. My problem is that some of them have a -xxxxx.xxxx.xxx after them such as KB929221-33883.333.29299 and I need to only look at the actual KB929221 piece. I hope that makes sense and I appreciate your help.
Your Script:
'==========================================================================
'
' NAME: <MemProcDiskInventory.vbs>
'
' AUTHOR: Mark D. MacLachlan , ITSynergy
' DATE : 5/15/2003
'
' COMMENT: <Inventories computer configuration and writes report to disk>
'==========================================================================
on error resume Next
Const ForReading = 1
Dim arrText()
Dim iUpperBound
Dim filename
Dim newfilename
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fs

penTextFile("MSPatches.txt", ForReading)
iUpperBound = 0
While Not ts.AtEndOfStream
ReDim Preserve arrText(iUpperBound)
arrText(UBound(arrText)) = ts.ReadLine
iUpperBound = iUpperBound + 1
Wend
Set oShell = CreateObject("wscript.Shell")
Set env = oShell.environment("Process")
strComputer = env.Item("Computername")
Const HKEY_LOCAL_MACHINE = &H80000002
Const UnInstPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
".\root\default:StdRegProv")
report = strComputer & " Computer Inventory" & vbCrLf & "******************************************" & vbCrLf & vbCrLf
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48)
report = report & vbCrLf & "******************************************" & vbCrLf
report = report & "OS Information" & vbCrLf & "******************************************" & vbCrLf & vbCrLf
For Each objItem in colItems
report = report & strComputer & vbCrLf & "OS Details"& vbCrlf
report = report & "Caption: " & objItem.Caption & vbCrLf
report = report & "Description: " & objItem.Description & vbCrLf
report = report & "EncryptionLevel: " & objItem.EncryptionLevel & vbCrLf
report = report & "InstallDate: " & objItem.InstallDate & vbCrLf
report = report & "Manufacturer: " & objItem.Manufacturer & vbCrLf
report = report & "MaxNumberOfProcesses: " & objItem.MaxNumberOfProcesses & vbCrLf
report = report & "Name: " & objItem.Name & vbCrLf
report = report & "Organization: " & objItem.Organization & vbCrLf
report = report & "OSProductSuite: " & objItem.OSProductSuite & vbCrLf
report = report & "RegisteredUser: " & objItem.RegisteredUser & vbCrLf
report = report & "SerialNumber: " & objItem.SerialNumber & vbCrLf
report = report & "ServicePackMajorVersion: " & objItem.ServicePackMajorVersion & vbCrLf
report = report & "ServicePackMinorVersion: " & objItem.ServicePackMinorVersion & vbCrLf
report = report & "Version: " & objItem.Version & vbCrLf
report = report & "WindowsDirectory: " & objItem.WindowsDirectory & vbCrLf
Next
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
report = report & vbCrLf & "******************************************" & vbCrLf
report = report & "Memory and Processor Information" & vbCrLf & "******************************************" & vbCrLf & vbCrLf
For Each objComputer in colSettings
'report = report & objComputer.Name & vbcrlf
report = report & objComputer.TotalPhysicalMemory /1024\1024+1 & "MB Total memory" & vbcrlf
Next
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_Processor")
For Each objProcessor in colSettings
report = report & objProcessor.Description & " Processor" & vbCrLf
Next
report = report & vbCrLf & "******************************************" & vbCrLf
report = report & "Disk Drive Information" & vbCrLf & "******************************************" & vbCrLf & vbCrLf
Set objWMIService = GetObject("winmgmts:")
Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='c:'")
report = report & objLogicalDisk.FreeSpace /1024\1024+1 & "MB Free Disk Space" & vbCrLf
report = report & objLogicalDisk.Size /1024\1024+1 & "MB Total Disk Space" & vbCrLf
oReg.EnumKey HKEY_LOCAL_MACHINE, UnInstPath, arrSubKeys
software = vbCrLf & "******************************************" & vbCrLf
software = software & vbCrLf & "Microsoft Patches Summary" & vbCrLf & "******************************************" & vbCrLf & VbCrLf
tst = Chr(1) & Join(arrSubKeys, Chr(1)) & Chr(1)
For i = 0 To UBound(arrText)
If InStr(1, tst, Chr(1) & arrText(i) & Chr(1), 1) > 0 Then
software = software & arrText(i) & " IS installed!" & VbCrLf
Else
software = software & arrText(i) & " IS NOT installed!" & VbCrLf
End If
Next
Set fso = CreateObject("Scripting.FileSystemObject")
filename = strcomputer & ".txt"
newfilename = strcomputer & "_BEFORE.txt"
If fso.fileExists(filename) Then
Set ts = fso.movefile (filename, newfilename)
Else
Set ts = fso.CreateTextFile (strComputer & ".txt", ForWriting)
End If
Set ts = fso.CreateTextFile (strComputer & ".txt", ForWriting)
ts.write report
ts.write software
ts.Close
WScript.Quit
'------------------
The MSPatches.txt file that it compares to.
'------------------
KB896424
KB904706
KB902400
KB896688
KB900725
KB907245
KB905749
KB899589
KB905414
KB905495
KB897715