Skip to content

Add WiFi Payload to Profile

This function is used to add a new WiFi payload to the specified profile.

Public Function AddWifiPayloadToProfile
(profileId As Integer, networkName As String, hiddenNetwork As Boolean, autoJoin As Boolean, securityType As String,
password As String, proxyType As String, proxyServer As String, proxyPort As String, proxyAuthentication As String,
proxyPassword As String, proxyServerConfigURL As String, changelogComment As String) As Boolean

Returns a boolean value. True if succeeded, false if not.

VBScript

Set oCMS = CreateObject("CapaInstaller.SDK")
Wscript.echo oCMS.SetDefaultManagementPoint("2")
Dim iProfileId : iProfileId = 28
Dim sNetworkName : sNetworkName = "Prod"
Dim bHiddenNetwork : bHiddenNetwork = False
Dim bAutoJoin : bAutoJoin = True
Dim sSecurityType : sSecurityType = "WPA"
Dim sPassword : sPassword = "1234"
Dim sProxyType : sProxyType = "None"
Dim sProxyServer : sProxyServer = ""
Dim sProxyPort : sProxyPort = ""
Dim sProxyAuthentication : sProxyAuthentication = ""
Dim sProxyPassword : sProxyPassword = ""
Dim sProxyServerConfigURL : sProxyServerConfigURL = ""
Dim sChangelogComment : sChangelogComment = "Added wifi with sdk"
Wscript.echo "Added Prod wifi: " & oCMS.AddWifiPayloadToProfile(iProfileId, sNetworkName, bHiddenNetwork, bAutoJoin, sSecurityType, sPassword, sProxyType, sProxyServer, sProxyPort, sProxyAuthentication, sProxyPassword, sProxyServerConfigURL, sChangelogComment)
iProfileId = 29
sNetworkName = "Public"
bHiddenNetwork = True
bAutoJoin = True
sSecurityType = "WEP"
sPassword = "4321"
sProxyType = "Automatic"
sProxyServer = ""
sProxyPort = ""
sProxyAuthentication = ""
sProxyPassword = ""
sProxyServerConfigURL = "http://192.168.0.10:8080/proxy.pac"
sChangelogComment = "Added public wifi with sdk"
Wscript.echo "Added Public wifi: " & oCMS.AddWifiPayloadToProfile(iProfileId, sNetworkName, bHiddenNetwork, bAutoJoin, sSecurityType, sPassword, sProxyType, sProxyServer, sProxyPort, sProxyAuthentication, sProxyPassword, sProxyServerConfigURL, sChangelogComment)