In some situations custom inventory is better than using file inventory for gathering information about a specific file type from many different computers. By default file Inventory only detects detailed information for EXE and DLL files and has many exclusion rules built in to limit which folders it scans. It is possible to add inclusion rules to file inventory (see http://www.symantec.com/docs/HOWTO84131) to be able to report any desired files, however custom inventory is a far more efficient and reliable method when there is only one desired file with the same name and location on all computers. This article presents a sample custom inventory script and custom report that displays the custom inventory data. See the attachments for examples of more advanced custom inventory scripts. Please note that Symantec Support does not support custom scripting or reporting so modifications to the script and report must be made by the user.
Create a new custom data class that will store the file information for each computer.
Create a Custom Inventory Script Task.
'*********************************************************
' Custom inventory VBS script to scan for MDB files (Access DB files)
'*********************************************************
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set wshShell = WScript.CreateObject( "WScript.Shell" )
ComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
dim nse
set nse = WScript.CreateObject ("Altiris.AeXNSEvent")
' Please don't modify this GUID
nse.To = "{1592B913-72F3-4C36-91D2-D4EDA21D2F96}"
nse.Priority = 1
'*********************************************************
set objDCInstance = nse.AddDataClass ("Custom Data Class Name") '***Modify this line with the name of the custom dataclass
'set objDCInstance = nse.AddDataClass ("{PUT CUSTOM DATA CLASS GUID HERE AND LEAVE BRACKETS}") '***Alternative method
set objDataClass = nse.AddDataBlock (objDCInstance)
Set objCIMObj = objWMIService.ExecQuery("SELECT * FROM CIM_DataFile where Extension='mdb'") '***File extension here
For each objInfo in objCIMObj
dim file_location
file_location = objInfo.Drive + objInfo.Path + objInfo.FileName + "." + objInfo.Extension
set objDataRow = objDataClass.AddRow
objDataRow.SetField 0, CStr(ComputerName)
objDataRow.SetField 1, file_location
Next
'msgbox nse.xml '***Uncomment this line for troubleshooting
nse.Send
Run the Custom Inventory Script task
Create a Custom Report to view the data collected by the custom inventory
KB 178304 “How to View Custom Inventory Data with a Custom Report”