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


This function is used to Edit an existing WiFi payload in the specified profile.


Public Function EditWifiPayload
(profileId As Integer, currentNetworkName As String, 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


ProfileID (Integer)

The ID of the profile you wish to edit. (Use Get Profiles to get more information on existing profiles)

CurrentNetworkName (String)

The network name (SSID) of the wifi payload you wish to edit

NetworkName (String)

The name of the WiFi network the devices should join. This is a mandatory parameter

Hidden Network (Boolean)

Enable if target network is not open or broadcasting

Auto Join (Boolean)

Automatically join this wireless network

SecurityType (String)

The type of WiFi security used on the WiFi network. Options are: None, WEP, WPA and Any

Password (String)

The password used to authenticate against the WiFi network. This setting is mandatory if securityType is WEP, WPA or Any

ProxyType (String)

Configures proxy settings to be used with this network. Options are: Automatic, Manual, None

ProxyServer (String)

The proxy server's network address. Mandatory if proxyType is Manual

ProxyPort (String)

The proxy server's port. Mandatory if proxyType is Manual

ProxyAuthentication (String)

The username used to authenticate to the proxy server. Mandatory if proxyType is Manual

ProxyPassword (String)

The password used to authenticate to the proxy server. Mandatory if proxyType is Manual

ProxyServerConfigURL (String)

The URL of the PAC file that defines the proxy configuration. Mandatory if proxyType is Automatic

ChangelogComment (String)

Comment you wish to be added to the changelog

Return value

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


Set oCMS = CreateObject("CapaInstaller.SDK") 
Wscript.echo oCMS.SetDefaultManagementPoint("2") 

Dim iProfileId              : iProfileId = 28
Dim sCurrentNetworkName     : sCurrentNetworkName = "Prod"
Dim sNetworkName            : sNetworkName = "Prod"
Dim bHiddenNetwork          : bHiddenNetwork = True
Dim bAutoJoin               : bAutoJoin = True
Dim sSecurityType           : sSecurityType = "WPA"
Dim sPassword               : sPassword = "123456789"
Dim sProxyType              : sProxyType = "None"
Dim sProxyServer            : sProxyServer = ""
Dim sProxyPort              : sProxyPort = ""
Dim sProxyAuthentication    : sProxyAuthentication = ""
Dim sProxyPassword          : sProxyPassword = ""
Dim sProxyServerConfigURL   : sProxyServerConfigURL = ""
Dim sChangelogComment       : sChangelogComment = "Changed wifi password with sdk"

Wscript.echo "Changed Prod wifi: " & oCMS.EditWifiPayload(iProfileId, sCurrentNetworkName, sNetworkName, bHiddenNetwork, bAutoJoin, sSecurityType, sPassword, sProxyType, sProxyServer, sProxyPort, sProxyAuthentication, sProxyPassword, sProxyServerConfigURL, sChangelogComment)

Please note

 If multiple wifi payloads exists in the specified profile, with the same network name specified in 'CurrentNetworkName', they will all be removed and replaced with one new wifi payload with the specified settings.

  • No labels