# Edit WiFi Payload

> Edits an existing WiFi payload in the specified profile.

Source: https://docs.capaone.com/capainstaller/sdk-capainstaller-software-development-kit-functions/mdm-functions/edit-wifi-payload/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

## Description

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

## Syntax

**VBScript**

```vb
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
```

## Parameters

## Return value

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

## Example

**VBScript**

```vb
Set oCMS = CreateObject("CapaInstaller.SDK") 
Wscript.echo oCMS.SetInstanceManagementPoint("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)
```

:::note[Important]
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.
:::
