# Add/edit Enforce Passcode (Android)

> Adds a new Enforce Passcode payload or edits an existing one in the specified profile.

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

## Description

This function is used to add a new Enforce Passcode payload or edit an existing payload in the specified profile.

## Syntax

**VBScript**

```vb
Public Function AddEditEnforcePasscodeAndroid(ProfileId As Integer, Passcode As String, ChangelogComment As String) As Boolean
```

## Parameters

## Return value

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

## Example

**VBScript**

```vb
Set oCMS = CreateObject("CapaInstaller.SDK") 
Wscript.echo oCMS.SetInstanceManagementPoint("2") 

Dim iProfileId                  : iProfileId = 184
Dim sPasscode                    : sPasscode = "918273"
Dim sChangelogComment           : sChangelogComment = "Changed passcode on profile with sdk"
Wscript.echo "Changed passcode: " & oCMS.AddEditEnforcePasscodeAndroid(iProfileId, sPasscode, sChangelogComment)
```
