Create a Custom Inventory for Video or Display Drivers using VBScript.
Hardware Inventory collects some information on video drivers in the Inv_HW_Video_Controller_Windows table but more information can be obtained from the Win32_VideoController WMI class by a custom inventory. The following steps show how to set up a custom inventory to collect video driver information. Please note that Symantec Support does not support customization so further modifications must be made by the user.
'Following is a sample custom inventory sript gathering information about processor of a machine and posting data
'to NS using Altiris NSE Component
'Adapted from http://www.symantec.com/connect/forums/altiris-71-custom-inventory-video-driver-versions
'=========================================================================================
' On Error Resume Next
'Create instance of Wbem service object and connect to namespace
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
'Fire WMI Query
Set objCIMObj = objWMIService.ExecQuery("Select * from Win32_VideoController")
'=========================================================================================
'Create instance of Altiris NSE component
dim nse
set nse = WScript.CreateObject ("Altiris.AeXNSEvent")
' Set the header data of the NSE
' Please don't modify this GUID
nse.To = "{1592B913-72F3-4C36-91D2-D4EDA21D2F96}"
nse.Priority = 1
'Create Inventory data block. Here assumption is that the data class with below guid is already configured on server
dim objDCInstance
set objDCInstance = nse.AddDataClass ("Video_Drivers") '****Your Custom Data Class Name here
dim objDataClass
set objDataClass = nse.AddDataBlock (objDCInstance)
For each objInfo in objCIMObj
'Add a new row
dim objDataRow
set objDataRow = objDataClass.AddRow
'Set columns
objDataRow.SetField 0, objInfo.Name
objDataRow.SetField 1, objInfo.DriverVersion
objDataRow.SetField 2, objInfo.InstalledDisplayDrivers
objDataRow.SetField 3, objInfo.DriverDate
Next
nse.SendQueued
select vComputer.Name, Inv_Video_Drivers.Model, Inv_Video_Drivers.Version, Inv_Video_Drivers.[Installed Display Drivers], Inv_Video_Drivers.Date
from Inv_Video_Drivers
left join vComputer on vComputer.Guid = Inv_Video_Drivers._ResourceGuid