Discovery and Inventory Group

 View Only
  • 1.  Inventory a deployed url

    Posted Jan 28, 2020 09:44 AM

    I have a task script that has been used in a managed software policy for a while now. The script task produces a url .lnk file on the User's desktop space to access a web application; the policy executes upon user login. I am having trouble producing a report on computers that have executed this policy, and also trying to inventory against this particular url. If I right-click on the policy > Report > Software Compliance Report I get no results returned and if I choose Software Execution Report, the task script I am concerned with is not relavant to the execution report. Is there a special report under Reports that maybe I am not finding that could give me results of this policy execution?



  • 2.  RE: Inventory a deployed url

    Posted Jan 28, 2020 11:03 AM

    You could add a compliance check to your MSD,

    You could write a value to the reg and then that could be your check, you'd just need a way to remove that key when the lnk is removed.



  • 3.  RE: Inventory a deployed url

    Posted Jan 28, 2020 12:51 PM

    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



  • 4.  RE: Inventory a deployed url
    Best Answer

    Posted Jan 28, 2020 03:46 PM

    I put in a ticket with symantec, my attribute 'File' needed to have [] ex. [File]. The attribute must already be used for something else in sql.