CreateDetectedSoftwarePatchInstance
The CreateDetectedSoftwarePatchInstance function adds a record to the software detection output file when the script detects an instance of a particular patch.
cla140
The CreateDetectedSoftwarePatchInstance function adds a record to the software detection output file when the script detects an instance of a particular patch.
Function format:
CreateDetectedSoftwarePatchInstance (ProductName as String, ProductVersionLabel, as String, ReleaseName as String, ReleaseVersionLabel as String, PatchName as String, PatchVersionLabel as String, OptionalProperties as String) as an integer
Example: CreateDetectedSoftwarePatchInstance
CreateDetectedSoftwarePatchInstance ("Microsoft Windows 7 Ultimate", "6.1", "Microsoft Windows 7 Ultimate x64 64 en-us", "6.1.7600", "KB971033 x64 64 en-us", "", "Origin=Forward Inc |TrustLevel=5 |")
This function must be invoked after calling the CreateDetectedSoftwarePatch function within each script. The CreateDetectedSoftwarePatchInstance function can be invoked as many times as the number of instances. Each instance gets a separate discovered software record.
If two different Intellisigs detect the same software instance, two discovered software records are created, one for each Intellisig.
Input Parameters
This function has the following input parameters:
- ProductNameThis parameter specifies the name of the product that the patch belongs to. You must have invoked the CreateDetectedSoftwareProduct function for this product within the script.
- ProductVersionLabelThis parameter specifies the version label of the product.
- ReleaseNameThis parameter specifies the name of the release that the patch belongs to. You must have invoked the CreateDetectedSoftwareRelease function for this release within the script.
- ReleaseVersionLabelThis parameter specifies the version label of the release.
- PatchNameThis parameter specifies the name of the detected software patch. You must have invoked the CreateDetectedSoftwarePatch function for this release within the script.
- PatchVersionLabelThis parameter specifies the version label of the patch.
- OptionalPropertiesThis parameter specifies the optional properties that are associated with the discovered software instance. Following optional properties are available for instances:
- ProductGUIDThis optional property specifies the product UUID as detected by the script.
- LabelThis optional property specifies a unique label for the instance.
- OriginThis optional property specifies the name of the Intellisig creator.
- TrustLevelThis optional property specifies the trust level of the creator of the Intellisig, script, or both.
- InstallPathThis optional property specifies the path to the product installation directory or the executable on the agent computer.
- SerialNumberThis optional property specifies the serial number of the instance.
- LastAccessedThis optional 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 from 1-1-1970 UTC) before output. DSM Explorer displays this using the local time zone on the system on which it is running.
- CustomDataThis optional property specifies any other custom data that you want to store for the instance.
Return Values
- CA_SWDETECT_OKThis value indicates that the function completed the operation successfully.
- CASWDETECT_BADARGSThis value indicates that one or more mandatory parameters that are passed to the function are blank.
- CASWDETECT_FILE_ERRORThis value indicates that the function was unable to write to the file. See the log file for more information.