user on WINDOWS NT

poc3796
poc3796 used Ask the Experts™
on
I would create a delphi program to create new user (with password, mail box on outlook server, ecc. ) within my network WINDOWS NT based.
It's this possible?
You can help me to do this

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
Edited text of question.

Author

Commented:
Edited text of question.

Commented:
Use NetUserAdd.

Regards, Madshi.

Author

Commented:
i look for help on win32 and I see that I have to create a data structure to using this Api but I can understand very well how to do this in delphi...

can you help me?

another question: I would add this user also to Exchange server, when I create the user from NT the user manager open the second windows where I can put information I can do this in program

please help
and excuse my bad english
Commented:
The structure should look like this:

type
  TUserInfo1 = packed record
    name         : PWideChar;
    password     : PWideChar;
    password_age : DWord;
    priv         : DWord;
    home_dir     : PWideChar;
    comment      : PWideChar;
    flags        : DWord;
    script_path  : PWideChar;
  end;

The function declaration like this:

function NetUserAdd(server: PWideChar; level: DWord; var info: TUserInfo1; var out: DWord) : DWord; stdCall;
         external 'netapi32.dll' name 'NetUserAdd';

Regards, Madshi.

P.S: I didn't understand your "another question". I don't have NT here right now, so I can't check this second window. I can't tell you more than what is written in the NetUserAdd documentation (and perhaps how to use it in Delphi).

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial