Add WiFi Payload to Profile
Description
This function is used to add a new WiFi payload to the specified profile.
Syntax
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
Parameters
ProfileID (Integer)
The ID of the profile you wish to edit. (Use Get Profiles to get more information on existing profiles)
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 succeeded, false if not.
Example
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)