I created following script for pulling registry key. But I didn't get any result. In database query executed successfully but not showing any result.
'Gather registry key value from machine and posting data to NS using Altiris NSE Component
'===================================================================================================================
' On Error Resume Next
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject( _
"winmgmts:{impersonationLevel=impersonate}!\\"&_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Registration\{90140000-0011-0000-0000-0000000FF1CE}"
strValueName1 = "ProductNameNonQualified"
strValueName2 = "ProductID"
strValueName3 = "DigitalProductID"
oReg.GetStringValue _
HKEY_LOCAL_MACHINE,strKeyPath,strValueName1,ProductNameNonQualified
oReg.GetStringValue _
HKEY_LOCAL_MACHINE,strKeyPath,strValueName2,ProductID
oReg.GetStringValue _
HKEY_LOCAL_MACHINE,strKeyPath,strValueName3,DigitalProductID
'WScript.Echo "Request ID: "& ProductID
'WScript.Echo "Computer Description: "& DigitalProductID
if isnull(ProductNameNonQualified) then
ProductNameNonQualified = "missing"
end if
if isnull(ProductID) then
ProductID = "missing"
end if
if isnull(DigitalProductID) then
buildversion7 = "missing"
end if
'===================================================================================================================
'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 ("{16219e3e-a7e5-43c2-9189-4d95a397c68d}")
dim objDataClass
set objDataClass = nse.AddDataBlock (objDCInstance)
'Add a new row
dim objDataRow
set objDataRow = objDataClass.AddRow
'Set columns
objDataRow.SetField 0, ProductNameNonQualified
objDataRow.SetField 1, ProductID
objDataRow.SetField 2, DigitalProductID
nse.SendQueued