I want to check for a specific Windows Security Update in my WinForm running on an offline standalone Win7 Kiosk Machine. I think I have an infinite loop cause it just hangs when I run this code. I can't seem to find my issue. I found similar code in C# and tried to convert it to VB.NET but maybe I didn't do it correctly.
I basically just want to check the system for KB3033929 and then if it is installed, hide a button and show a label.
' ***** CHECK FOR PATCH *****
Dim objSession = CreateObject("Microsoft.Update.Session")
Dim objSearcher = objSession.CreateUpdateSearcher
Dim objResults = objSearcher.Search("Type='Software'")
Dim colUpdates = objResults.Updates
For i = 0 To colUpdates.Count - 1
If colUpdates.Item(i).Title = "Security Update for Windows (KB3033929)" Then
If colUpdates.Item(i).IsInstalled <> 0 Then
Label4.Visible = True
PatchInstall.Visible = False
End If
End If
Next