Skip to content

Get unit packages

Gets the packages linked to the specified unit.

GetUnitPackages(Byval UnitName as String, Byval UnitType as String) as ArrayList

UnitName (String)

The name of the unit

UnitType (String)

Type of Unit

  • “Computer”
  • “User”

The function returns an array of packages. Each package (p) in the array is a joined line with the character defined with Set splitter.

  • p.Name
  • p.Version
  • p.Type
  • p.DisplayName
  • p.IsMandatory
  • p.ScheduleId
  • p.Description
  • p.GUID
  • p.ID
  • p.IsInteractive
  • p.DependendPackageID
  • p.IsInventoryPackage
  • p.CollectMode
  • p.Priority
  • p.ServerDeploy

VBScript

Set oCMS = CreateObject("CapaInstaller.SDK")
Set aUnit = CreateObject("System.Collections.ArrayList")
wscript.echo oCMS.SetDefaultManagementPoint("1")
Set aUnit = oCMS.GetUnitPackages("Klient","Computer")
for each item in aUnit
wscript.echo item
next