Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » VBScript » Custom script

Install an Update

You can use any of the VBScript programs below in ActiveXperts Network Monitor. Click here for an explanation about how to include scripts in ActiveXperts Network Monitor.

Example(s)

Set objCollection = CreateObject("Microsoft.Update.UpdateColl")

Set objSearcher = CreateObject("Microsoft.Update.Searcher")
Set objResults = objSearcher.Search _
    ("UpdateID='ac94db3b-e1a8-4e92-9fd0-e86f355e6a44'")
Set colUpdates = objResults.Updates
objCollection.Add(colUpdates.Item(0))

Set objInstaller = CreateObject("Microsoft.Update.Installer")
objInstaller.Updates = objCollection
Set objInstallResults = objInstaller.Install
Wscript.Echo objInstallResults.Exception
Wscript.Echo objInstallResults.RebootRequired
Wscript.Echo objInstallResults.ResultCode