'******************************************************************************
'AvSettings-
wmi.vbs
'Author: Peter Costantini, The Microsoft Scripting Guys
'Date: 9/1/04
'Version: 1.0
'This script reads properties of an installed anti-virus product, using
WMI.
'root\SecurityCenter:AntiVirusProduct is new on Windows XP Service Pack 2.
'******************************************************************************
strComputer = "." 'Can set to remote machine.
Set objAntiVirusProduct = GetObject _
("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & _
"\root\SecurityCenter:AntiVirusProduct")
If Err = 0 Then
Err.Clear
WScript.Echo "companyName: " & objAntiVirusProduct.companyName
WScript.Echo "displayName: " & objAntiVirusProduct.displayName
WScript.Echo "enableOnAccessUIMd5Hash: " & _
objAntiVirusProduct.enableOnAccessUIMd5Hash
WScript.Echo "enableOnAccessUIParameters: " & _
objAntiVirusProduct.enableOnAccessUIParameters
WScript.Echo "instanceGuid: " & objAntiVirusProduct.instanceGuid
WScript.Echo "onAccessScanningEnabled: " & _
objAntiVirusProduct.onAccessScanningEnabled
WScript.Echo "pathToEnableOnAccessUI: " & _
objAntiVirusProduct.pathToEnableOnAccessUI
WScript.Echo "pathToUpdateUI: " & objAntiVirusProduct.pathToUpdateUI
WScript.Echo "productUptoDate: " & objAntiVirusProduct.productUptoDate
WScript.Echo "updateUIMd5Hash: " & objAntiVirusProduct.updateUIMd5Hash
WScript.Echo "updateUIParameters: " & objAntiVirusProduct.updateUIParameters
WScript.Echo "versionNumber: " & objAntiVirusProduct.versionNumber
Else
WScript.Echo "Unable to connect to AntiVirusProduct class on " & _
strComputer & "."
WScript.Echo " Error Number:" & Err.Number
WScript.Echo " Source:" & Err.Source
WScript.Echo " Description:" & Err.Description
End If