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.Quit
        Else
            Wscript.Echo “This update is not installed.”
            Wscript.Quit
        End If
    End If
Next

Wscript.Echo “This update is not installed.”

4 thoughts on “How to check if a particular patch is installed

  1. That’s a very useful script. Now part of my useful I.T stuff folder 🙂

    If you have anymore useful scripts, could you email them my way please? Hope you don’t mind, thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.