setpassword
Adds or Overwrites a password.
Format
setpassword <filename> <password name> <password>
Parameters
- string <filename>
- Password file name.
- string <password name>
- Password identifier.
- string <password>
- Password to be saved.
Return Value
- System variable <result>
- When the password file can not be written, it is set to 0.
Otherwise, it is set to 1.
Remarks
A password identified by <password name> from the password file <filename> is updated.
<password> is encrypted and stored into the file.
If the specified file does not exist, it is newly created.
A password file can contain multiple passwords.
Each of them is identified by the password identifier.
Example
newpasswd = 'bar' setpassword 'password.dat' 'foo' newpasswd if result then messagebox 'Password updated successfully.' 'Result' endif