wntUserRename

Renames a user account.

Syntax:

wntUserRename(server-name, old-username, new-username [, input-format-flag])

Parameters:

(s) server-name: UNC name of the server on which the function will execute (eg, "\\MYSERVER"), or " " for the local computer.

(s) old-username: An existing account name.

(s) new-username: New name to be given to the account.

(i) input-format-flag: [optional] controls how the user-name parameter value is interpreted.

Value
 Meaning
0 (default) user-name of an actual user account name.
1 user-name contains a SID value instead of an actual user account name.

Returns:

(i) @TRUE on success, @FALSE if there was a problem.

Example:
; Load Appropriate Extender
AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')

wntUserRename("", "OldUser", "NewUser",0) Message("User Rename","Complete") Exit
See Also:

wntUserInfo