How to check if a particular patch is installed

Reading Time: < 1 minute

To check if a particular update is installed on your machine, you could browse to the control panel or check the Windows directory.

If you wish to carry out this task via script, the script can be found below. Just replace the patch in the highlighted area.

Set objSession = CreateObject(“Microsoft.Update.Session”)
Set objSearcher = objSession.CreateUpdateSearcher
Set objResults = objSearcher.Search(“Type=’Software'”)
Set colUpdates = objResults.Updates

For i = 0 to colUpdates.Count – 1
    If colUpdates.Item(i).Title = _
        “Security Update for Windows XP (KB89000)” Then
        If colUpdates.Item(i).IsInstalled <> 0 Then
            Wscript.Echo “This update is installed.”
            Wscript.Echo “This update is not installed.”
        End If
    End If

Wscript.Echo “This update is not installed.”