JCL Help:CreateAccount

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Creates a new user account on a Windows NT machine.


Pascal

 function CreateAccount(const Server: string; const Username: string; const Fullname: string; const Password: string; const Description: string; const Homedir: string; const Script: string; const PasswordNeverExpires: Boolean = True): Boolean;


Parameters

Parameters Description
const Server: string The name of the server to create the user account on. If this parameter is the empty string, the account will be created on the local machine.
const Username: string Specifies the name of the user account.
const Fullname: string The full name of the user.
const Password: string The password for the user account.


Return Value

If the function succeeds it returns True, otherwise it returns False.


Description

CreateAccount creates a new user account on a Windows NT machine using the LAN Manager API. Thus, you cannot create user accounts on Windows 9x or Windows Me machines. A comment to be associated with this user account. This parameter can be empty. Homedir - The user's home directory. This parameter can be empty. Script - Path to the user's logon script (which can be a .CMD, .EXE or .BAT file). This parameter can be empty.


See Also

CreateLocalAccount


About

Unit

JclLANMan


Donator

Peter Friese


Notes

If the function returns False, the user can retrieve extended error information by calling RaiseLastOSException.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page