78
Gathering custom inventory
About creation interfaces
Set objCIMObj = objWMIService.ExecQuery("select * from CIM_processor")
2. Create NSE objects for the custom data class GUID:
'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 the following GUID. It defines what receives
and processes the NSE on server. The priority value defines the
priority in which the NSE should be processed. Always keep it 1.
nse.To = "{1592B913-72F3-4C36-91D2-D4EDA21D2F96}"
nse.Priority = 1
'Create Inventory data block. Here, the assumption is that the data
class with the below guid is already configured on server. This
creates a data class with the specified GUID. The GUID used here can
be obtained from Manage Custom Dataclasses page > select a required
data class and click the details symbol.
dim objDCInstance
set objDCInstance = nse.AddDataClass ("{e8220123-4987-4b5e-bc39-
ec6eaea312ef}")
' Add the datablock so that rows can be added to the data class.
dim objDataClass
set objDataClass = nse.AddDataBlock (objDCInstance)
3. Store the gathered values into the NSE objects:
For each objInfo in objCIMObj
'Add a new row
dim objDataRow
set objDataRow = objDataClass.AddRow
'Set columns
objDataRow.SetField 0, objInfo.DeviceID
objDataRow.SetField 1, objInfo.L2CacheSize
objDataRow.SetField 2, objInfo.L2CacheSpeed
Need help?
Do you have a question about the ALTIRIS INVENTORY SOLUTION 7.0 SP2 - V1.0 and is the answer not in the manual?