When I add a task not software in a policy I do not get the Compliance Check option.
I was looking at custom inventory against a file (https://support.symantec.com/us/en/article.howto109692.html). I have done this for registry keys a few times in the past but not for a physical file. So far I put everything together (scipt/invtory class/report) the report comes up with
Report saving failed: An unexpected SQL error occurred when retrieving the schema from the RawSqlDataSource.
I have had this before with inventorying registry data, eventually found what I did wrong. But not this time, I am not good with sql which has always been my weakness.
SCRIPT:
'*******************************************************
'This Custom Inventory vbscript detects a specified file
'*******************************************************
set objFSO = CreateObject("Scripting.FileSystemObject")
'Create the NSE
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. The following data class with below guid is already configured on server.
'Brackets are required around the dataclass guid. To get this GUID, click on the custom data class and then the hand (details).
dim objDCInstance
set objDCInstance = nse.AddDataClass ("Qmatic") '***your custom data class name here
' or "{6b6c9d38-a863-4d3a-b79a-3aeb87c25286}"
dim objDataClass
set objDataClass = nse.AddDataBlock (objDCInstance)
'Add a new row
dim objDataRow
set objDataRow = objDataClass.AddRow
dim fileName
fileName = "C:\Users\Public\Desktop\Qmatic.lnk" '***full path and name of the file to be detected
if(objFSO.FileExists(fileName)) Then
'If the file exist on the computer, get the details
Set objFile = objFSO.GetFile(fileName)
objDataRow.SetField 0, objFile.Name
objDataRow.SetField 1, objFile.Size
Else
objDataRow.SetField 0, "Not Found"
End If
' Send the NSE data to the NS server
nse.SendQueued
' msgBox nse.XML '***Uncomment this line for testing
DATA CLASS
Name: Qmatic
Attributes: File Size (individual attributes). Key set to no as stated in the url.
REPORT SQL
select vComputer.Name, Inv_Qmatic.File, Inv_Qmatic.Size from Inv_Qmatic
left join vComputer on vComputer.Guid = Inv_Qmatic._ResourceGuid