CMS_IsPackageLinked

Description

Checks if a given package linked to the computer

Syntax

CMS_IsPackageLinked(sPackage, sVersion) As Boolean

[bool]CMS_IsPackageLinked -package <string> -version <string>

Properties

sPackage (String)

Name of the package

sVersion (String)

Version of the package

Return value

Boolean, TRUE if function completed successfully. The result will be stored in gbValue. If the package is not found function will return false

Boolean, $true if the package is linked. Otherwise $false

Example

VBScript
If bStatus Then xStatus = CMS_IsPackageLinked("CapaInstaller", "v1.0") If bStatus Then xStatus = Job_WriteLog("Custom","gbValue: " & gbValue, bStatus, True) End If
PowerShell
if (CMS_IsPackageLinked "CapaInstaller" "v1.0") { $cs.Job_WriteLog("Linked","Package (CapaInstaller) is linked") }

Scripting Guidelines

Related functions

Â