Skip to content

Delete Package

Deletes a package from the current management point. You need administrator rights to packages on the management point.

Public Function DeletePackage(ByVal PackageName As String, ByVal PackageVersion As String, ByVal UnitType As String, ByVal Force As Boolean) As Boolean

PackageName (String)

The name of the package.

PackageVersion (String)

The package Version.

UnitType (String)

The package type;

  • “Computer” or 1
  • “User” or 2

Force (Boolean)

  • True: Removes all links to units, groups, and Business Units, and then deletes the package.
  • False: The function fails if the package is linked to any units, groups, or Business Units.

Boolean. The function returns true if the package is deleted, otherwise false.

VBScript

Set oCMS = CreateObject("CapaInstaller.SDK")
wscript.echo oCMS.SetInstanceManagementPoint("1")
wscript.echo oCMS.DeletePackage("Winrar","v3.0","1",True)