Page tree
Skip to end of metadata
Go to start of metadata

Description

Gets the folder structure of a package.


Syntax

GetPackageFolder(Byval PackageName as String, Byval PackageVersion as String, Byval PackageType as String) as String


Parameters

PackageName (String)

The name of the package as found in the Name column in the job-table.

PackageVersion (String)

The version of the package.

PackageType (String)

  • "1" (Computer)
  • "2" (User)


Return value

A string containing the folder of the package, i.e. 'CapaInstaller 4\'


Examples

VBScript - Prints the structure of the Hardware inventory package, on management point 1
Set oCMS = CreateObject("CapaInstaller.SDK") 
oCMS.SetDefaultManagementPoint("1") 
sFolderStructure = oCMS.GetPackageFolder("HWInventory", "v5", "Computer") 
Wscript.echo sFolderStructure 



VBScript - Prints the structure of all computer packages in management point 1
Set oCMS = CreateObject("CapaInstaller.SDK") 
oCMS.SetDefaultManagementPoint("1") 
oCMS.SetSplitter ("|")
Set arrPackages = CreateObject("System.Collections.ArrayList") 
Set arrPackages = oCMS.GetPackages("Computer") 
for each item in arrPackages 
  arr=Split(item,"|") 
  sPackageName = arr(0) 
  sPackageVersion = arr(1) 
  sPackageType = arr(2)   
  sPackageInfo = "Package Name: " & sPackageName & " Version: " & sPackageVersion & " Type: " & sPackageType   
  sFolderStructure = oCMS.GetPackageFolder(sPackageName, sPackageVersion, sPackageType) 
  Wscript.echo sPackageInfo & " Structure: " & sFolderStructure 
next 


Output (from 2 nd. example)

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Package Name: CitrixInventory Version: v5 Type: Computer Structure: Capainstaller\
Package Name: CMS4-Upgrade Version: v4.1 Type: Computer Structure: Capainstaller 4\
Package Name: CI Console Version: v5 Type: Computer Structure: Capainstaller\
Package Name: CustomInventory Version: v4.1 Type: Computer Structure: Capainstaller\
Package Name: CustomSoftwareInventory Version: v4.1 Type: Computer Structure: Capainstaller\
Package Name: FileScanner Version: v5 Type: Computer Structure: Capainstaller\
Package Name: HFInventory Version: v5 Type: Computer Structure: Capainstaller\
Package Name: HotFixInstaller Version: v5 Type: Computer Structure: Capainstaller\
Package Name: HWInventory Version: v5 Type: Computer Structure: Capainstaller\
Package Name: License Consolidation Version: v5 Type: Computer Structure: Capainstaller\
Package Name: LogonInventory Version: v5 Type: Computer Structure: Capainstaller\
Package Name: PerformanceGuard Version: v5 Type: Computer Structure: Capainstaller\
Package Name: SWInventory Version: v5 Type: Computer Structure: Capainstaller\
Package Name: VS_2008_TeamSuite_Trial Version: v1.0 Type: Computer Structure:



  • No labels