SetPassword

Use to specify a new user password.

Function Group Execution Windows Embedded Thin Client
SetPassword Security Synchronous Supported Supported Supported

Syntax

SetPassword( strUserName, optStrNewPassword )
strUserName
The name of the user.
optStrNewPassword
Optional The new password
Note: If you omit the this parameter, then the SetPassword function will launch an Enter a new password dialog, so the user can enter a new password.

Returned value

This function returns the following possible values:
Value Description
-1 Internal error; contact Technical Support.
0 Password set successfully.
1 Invalid number of parameters.
2 Wrong parameter type.
3 Specified user does not exist.
4 Reentrant call not allowed.
5 User clicked Cancel.
6 Group does not exist.
7 Password too weak.
8 Invalid password.
9 Invalid user.
10 User currently logged on does not have the rights to set user password (i.e., user does not have Edit Security System).
11 Server offline.
12 Error.
13 Confirm password does not match.
14 Would open dialog.
15 The current Security Mode does not allow user password to be changed.

Examples

Tag Name Expression
Tag SetPassword( "Bob" )
Tag SetPassword( "Albert", "anemarie" )