This example uses a vbscript to pull CPU data from the Win32_Processor class using a WMI query.
Note there are many attributes available to collect - see the Microsoft article, Win32_Processor class
'=========================================================================================
' On Error Resume Next
'Create instance of Wbem service object and connect to namespace
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
'Get the computer name
Set wshShell = WScript.CreateObject( "WScript.Shell" )
strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
'Fire WMI Query
Set objCIMObj = objWMIService.ExecQuery("Select * from Win32_Processor")
'=========================================================================================
'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 ("{GUID}") '****Your Custom Data Class GUID, leave brackets
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, CStr(strComputerName)
objDataRow.SetField 1, objInfo.Manufacturer
objDataRow.SetField 2, objInfo.MaxClockSpeed
objDataRow.SetField 3, objInfo.Name
objDataRow.SetField 4, objInfo.NumberOfCores
objDataRow.SetField 5, objInfo.NumberOfLogicalProcessors
objDataRow.SetField 6, objInfo.Version
objDataRow.SetField 7, cstr(now)
Next
'nse.Send
MsgBox nse.Xml 'Uncomment for testing on local machine