Skip to content

CMS_RemovePackageFromUnit

Removes package from the unit

  • VBScript: The package is marked for removal on the client, and it’s removed from the unit the next time the agent runs. This also works when a package removes itself. The package must be known by the agent on the client.
  • PowerShell: The link between the package and the unit is removed in CapaInstaller right away. If the package isn’t linked to the unit, nothing is changed.
CMS_RemovePackageFromUnit(sPackage, sVersion) As Boolean

Package name

Package version

Boolean, TRUE if function completed successfully. FALSE if the package can’t be found on the client.

If bStatus Then bStatus = CMS_IsPackageLinked("CapaInstaller", "v1.0")
If bStatus And gbValue Then
If bStatus Then bStatus = CMS_RemovePackageFromUnit("CapaInstaller", "v1.0")
End If

Scripting Guidelines

CMS_AddPackageToUnit Constants Package Property Variables Business Unit support