Answered Script to install Outlook Hotfix

  • Monday, November 05, 2012 4:11 PM
     
      Has Code

    What I need is some script that I can run that looks to see if a certain Microsoft Office Outlook Hotfix is isntalled, if not then go ahead and install it.

    I have the Hotfix installed on my PC, I've found some scripts out there but none seem to work. It comes up saying that it's not installed on my PC, when it really is. It's like it's only searching for Windows Updates and not Office Updates/Hotfixes.

    Below is the script I currently have that is not working. It says that I don't have the Hotfix installed, but I do have it installed. 

    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 = _
            "Hotfix for Microsoft Outlook 2010 (KB2687351)" 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."


    • Edited by Cody244445 Monday, November 05, 2012 4:20 PM code
    • Edited by Cody244445 Monday, November 05, 2012 4:21 PM
    •  

All Replies