Skip to content

Clone Device Application

This function is used to clone an existing Device Application and its payloads.

Public Function CloneDeviceApplication(DeviceApplicationId As Integer, NewName As String, ChangelogComment As String) As Boolean
Parameter Type Description
DeviceApplicationId Integer The Id of the Device Application to clone. Get it with Get Device Applications.
NewName String The name of the new Device Application.
ChangelogComment String A comment that is added to the changelog entry of the Device Application.

Returns a boolean value. True if succeeded, false if not. The function returns false if no Device Application with the specified Id is found, for example if it’s the Id of a profile.

Set oCMS = CreateObject("CapaInstaller.SDK")
Wscript.echo oCMS.SetInstanceManagementPoint("2")
Dim iDeviceApplicationId : iDeviceApplicationId = 153
Dim sNewName : sNewName = "New cloned App"
Dim sChangelogComment : sChangelogComment = "Cloned App with sdk"
Wscript.echo "Cloning Device App: " & oCMS.CloneDeviceApplication(iDeviceApplicationId, sNewName, sChangelogComment)
sNewName = "New cloned App2"
Wscript.echo "Cloning Device App: " & oCMS.CloneDeviceApplication(iDeviceApplicationId, sNewName, sChangelogComment)