CreateDetectedSoftwareReleaseInstance

The CreateDetectedSoftwareReleaseInstance function adds a record to the software detection output file when the script detects an instance of a particular release.
cla140
The CreateDetectedSoftwareReleaseInstance function adds a record to the software detection output file when the script detects an instance of a particular release.
Function format:
CreateDetectedSoftwareReleaseInstance (ProductName as String, ProductVersionLabel as String, ReleaseName as String, ReleaseVersionLabel as String, OptionalProperties as String) as an integer.
Example:
CreateDetectedSoftwareReleaseInstance ("Microsoft Windows 7 Ultimate", "6.1", "Microsoft Windows 7 Ultimate x64 64 en-us", "6.1.7600", "Origin=Forward Inc | TrustLevel=5 | InstallPath=C:\Windows | SerialNumber=1234-567-890414-86668 | LastAccessed=2011-11-29:-12:30 |")
Call this function after calling the CreateDetectedSoftwareRelease function within each script. The CreateDetectedSoftwareReleaseInstance function can be invoked as many times as there are instances. Each instance gets a separate discovered software record.
If two different Intellisigs detect the same software instance, two discovered software records are created.
Input Parameters
This function has the following input parameters:
  • ProductName
    This parameter specifies the product name that the release belongs to. You must have invoked the CreateDetectedSoftwareProduct function for this product within the script.
  • ProductVersionLabel
    This parameter specifies the version label of the product.
  • ReleaseName
    This parameter specifies the name of the discovered software release.
  • ReleaseVersionLabel
    This parameter specifies the version label of the release.
  • OptionalProperties
    This parameter specifies the optional properties that are associated with the discovered software instance. The following optional properties are available for instances:
    • ProductGUID
      This property specifies the product UUID as detected by the script. For example, the product GUID of an MSI package
    • Label
      This property specifies a unique label for this instance. For example, the Microsoft SQL Server instance name
    • Origin
      This property specifies the name of the Intellisig creator.
    • TrustLevel
      This property specifies the trust level of the creator of the Intellisig, script, or both.
    • InstallPath
      This property specifies the path to the product installation directory or the executable on the agent computer.
    • SerialNumber
      This property specifies the serial number of the instance.
    • LastAccessed
      This property specifies date and time when the instance was last accessed. Specify the value in the following format: yyyy-mm-dd-hr:mm 
      This value is assumed to be in local time.
      All other functions in dmscript that deal with time, operate in local time. Dmscript converts the time value to Unix format (seconds later 1-1-1970 UTC) before output. DSM Explorer displays this using the local time zone on the system on which it is running.
    • CustomData
      This property specifies any other custom data that you want to store for the instance.
Return Values
  • CA_SWDETECT_OK
    This value indicates that the function completed the operation successfully.
  • CASWDETECT_BADARGS
    This value indicates that one or more mandatory parameters that are passed to the function are blank.
  • CASWDETECT_FILE_ERROR
    This value indicates that the function was unable to write to the file. See the log file for more information.