JCL Help:DeleteAccount

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Deletes a user account from the given Windows NT machine.


Pascal

 function DeleteAccount(const Servername: string; const Username: string): Boolean;


Parameters

Parameters Description
const Servername: string The name of the Windows NT machine to delete the account from. If this parameter is empty, the account will be deleted from the local machine.
const Username: string Specifies the name of the user account.


Return Value

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


Description

DeleteAccount permanently removes the given user account from the account database on the Windows NT machine specified by Servername.


See Also

DeleteLocalAccount CreateLocalAccount CreateAccount


About

Unit

JclLANMan


Donator

Peter Friese


Notes

If the function returns False, the user can retrieve extended error information by calling RaiseLastOSException. If you want to delete a user account from the domain account database, you should keep in mind to supply the name of the primary domain controller (PDC) in the parameter Servername. If the user name is not found in the user account database specified, it will fail.


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