Would it be possable for a .bat file to add a user in XP?

Status
Not open for further replies.

Kharn

Lord Techie,
Messages
7,638
I am wondering is it possible for a user to be added by a .bat file in XP or Vista? If it is can any one spare the time to give me a short example of how it would be done?

Cheers, Saxon.
 
Here you go:

Code:
net user Chris password pass /add /expires:never
net localgroup "Administrators" /add Chris

The second line is only to set the user to an admin. Take it out if you only want to create a basic user. Remove password if you don't want one.
 
cvb724 - thanks mate I will try that in the morning an let you know how it works.
 
Code:
net user Chris password pass /add /expires:never
net localgroup "Administrators" /add Chris

Would I just have to change Chris to say Paul or Sue say to make that the user name or is there anything else? sorry for the follow on I am just realy crap at .bat scripts.
 
Code:
net user Chris password pass /add /expires:never
net localgroup "Administrators" /add Chris

Would I just have to change Chris to say Paul or Sue say to make that the user name or is there anything else? sorry for the follow on I am just realy crap at .bat scripts.

Yes. Jsut change the name that appears first to anything you want. So if you want it to be Saxon you would just replace Chris with Saxon.
 
Status
Not open for further replies.
Back
Top Bottom