...
sVersion (String)
Package version
Return value
Boolean, TRUE if function completed successfully.
Boolean, TRUE if function completed successfully.
Example
The example below shows how this function could be used in a real world situation. The CompliancyCheck function could be included in the package itself or provided via CustomLib.cis and will prevent a package from running on 64 bit OS in this case.
...
Code Block | ||
---|---|---|
| ||
# this function will set the package status to NotCompliant function CompliancyCheck() { $result = true if ($env:PROCESSOR_ARCHITECTURE -eq "AMD64") { $cs.Job_WriteLog("CompliancyCheck", "Package is not allowed to run on 64 bit OS") $result = CMS_SetPackageStatusToNotCompliant -package 'AutoCad 11' -version 'v1.0' } return $result } |
Related functions
CMS_SetPackageStatusToInstalled https://capasystems.atlassian.net/wiki/spaces/CI66DOC/pages/19610726925