Need to install Microsoft KB update files on my XP computer

mevasquez

New member
Joined
Jan 5, 2009
Messages
2
Programming Experience
Beginner
I need to install the Microfost updates for about 35 XP machines. All the update files are located on a remote server. There are many files.

So far I have the following but it does not work:
VB.NET:
Imports WUApiLib
Dim Us As UpdateSession
Dim Updates As UpdateCollection
Dim download As UpdateDownloader
Dim usearch As UpdateSearcher
Dim usresult
Dim patch
Dim a As Integer
Dim updateTitle As String
Dim sComputer As String



sComputer = "NMCSDPC-HYHXVK1"
Updates = CreateObject("Microsoft.Update.UpdateColl", sComputer)
Us = CreateObject("Microsoft.Update.Session")

updateTitle = "Security Updates WindowsXP-KB971468-x86-ENU.exe"
download = Us.CreateUpdateDownloader()
usearch = Us.CreateUpdateSearcher()
usresult = usearch.Search("IsInstalled=0 Or IsInstalled=1 and Type='Software'") [color=green]' This is where it bombs out. [/color]

        For a = 0 To usresult.Updates.Count - 1
            patch = usresult.Updates.Item(a)
            If UCase(updateTitle) = UCase(patch.Title) Then
                Updates.Add(patch)
            End If
        Next

Sub getUpdates()


End Sub

Not sure what to do next or if I am even going in the right direction.

TIA
Mike V
 
Back
Top