Clone Package
Description
Section titled “Description”Clones a package in a root point under a new version. The current management point must be a root point.
The clone:
- Gets the same name as the original package and the version you specify.
- Gets the display name
<package name> <new version>. - Gets a copy of the package files.
- Has no schedule. The schedule of the original package isn’t copied.
- Is linked to the replica management servers on the management point.
The function fails if a package with the same name and the new version already exists.
Syntax
Section titled “Syntax”ClonePackage(ByVal name As String, ByVal version As String, ByVal Type As String, ByVal newVersion As String) As Boolean
Parameters
Section titled “Parameters”PackageName (String)
The name of the package.
PackageVersion (String)
The package Version.
PackageType (String)
The package type;
- 1 (Computer)
- 2 (User)
newVersion (String)
The new version of a package.
Return value
Section titled “Return value”Boolean. The function returns True if successful, otherwise false.
Script(s) will not be updated accordingly with the new version number
Example
Section titled “Example”Set oCMS = CreateObject("CapaInstaller.SDK")wscript.echo oCMS.SetInstanceManagementPoint("1")wscript.echo oCMS.ClonePackage("Winrar","v3.0","1","v4.0")