General discussion

Locked

Add user account to WinNT with a program

By Zlatin Zlatev ·
Well,
Can anybody help me with that problem:
I want to add with VC,VB or VFP(FoxPro) program a user account to WinNT User Manager.
Is there a way to do this, i.e. WinAPI functions, Registry hacks, etc.
Any help - welcome, especially tech-info and program code!
Regards,
The BIG RED FOX

This conversation is currently closed to new comments.

23 total posts (Page 1 of 3)   01 | 02 | 03   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Add user account to WinNT with a program

by SyscoKid In reply to Add user account to WinNT ...

One possibility would be to shell out of the program and run the native NT command "net user". For example,

net user <username> /<password> /add /domain

Collapse -

Add user account to WinNT with a program

by Zlatin Zlatev In reply to Add user account to WinNT ...
Collapse -

Add user account to WinNT with a program

by Zlatin Zlatev In reply to Add user account to WinNT ...

Actually I'm looking for a way to do that with no any use of external apps, even from SDKs, Resource Kits, other tools that are "standard" for the OS, etc.
(I do not like to use ShellExecute when I can avoid it)

btw. I've seen that in NTFAQ as:"How can I add a user from the command line?"
http://www.windows2000faq.com/Articles/Index.cfm?ArticleID=15064

Collapse -

Add user account to WinNT with a program

by Zlatin Zlatev In reply to Add user account to WinNT ...

Actually I'm looking for a way to do that with no any use of external apps, even from SDKs, Resource Kits, other tools that are "standard" for the OS, etc.
(I do not like to use ShellExecute when I can avoid it)

btw. I've seen that you've offered me, in NTFAQ as:
"How can I add a user from the command line?"
http://www.windows2000faq.com/Articles/Index.cfm?ArticleID=15064

Collapse -

Add user account to WinNT with a program

by kent.manley In reply to Add user account to WinNT ...

Gee, why don't you grab a win32 api manual and a c++ compiler and get to work?

There are at least three ways I know to do this:
1) NT Resource kit adduser program
2) win32 perl with win32 extension
3) VBScript can access the objects and methods you want.

What's your motivation for avoiding the api calls?

Kent

Collapse -

Add user account to WinNT with a program

by Zlatin Zlatev In reply to Add user account to WinNT ...

Well, actually I do not have a GOOD WinAPI manual, and am learning WinAPI functions from demos, source codes and tech-infos (mail-lists, discussion boards, etc.)
I DO NOT want to use PERL, actually I want to do this from a FoxISAPI server so it will be done in Visual FoxPro code.
Almost the same is with VBScript.
I can "translate" VB/VC++ code to VFP. I have basic knowledge in VB/VC++, and I haven't found yet many programs that I do not understand what they do.

Collapse -

Add user account to WinNT with a program

by Zlatin Zlatev In reply to Add user account to WinNT ...

I do not avoid api calls. I just do not want to call external EXEs

Collapse -

Add user account to WinNT with a program

by MauntelJW In reply to Add user account to WinNT ...

If you look in the NT Resourse Kit, there is a VB Script that can accomplish that. (Useraccount.vbs) I've used this before and it did the job.

Collapse -

Add user account to WinNT with a program

by Zlatin Zlatev In reply to Add user account to WinNT ...

I have checked the VBS that you send to me... Thanks BUT...
No, this is *not* what I want to do.

This VBS just *shows* the user accounts from the NT server.
It uses some CScript classes that I DO NOT know how they work, so I cannot convert thisto a code for *ADDING* User account to the remote NT Server.

Collapse -

Add user account to WinNT with a program

by Zlatin Zlatev In reply to Add user account to WinNT ...

Well I'm going to check the NT Resource kit.

Back to Networks Forum
23 total posts (Page 1 of 3)   01 | 02 | 03   Next

Related Discussions

Related Forums