Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Would it be possable for a .bat file to add a user in XP?
Closed Thread
Old 09-14-2008, 06:39 PM   #1 (permalink)
Saxon's Avatar
 

Join Date: Feb 2007

Posts: 6,362

Saxon is just really niceSaxon is just really niceSaxon is just really niceSaxon is just really nice

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

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.
__________________
I am not here for long I am deploying soon so please don't expect anything long winded.

Saxon is offline  
Old 09-14-2008, 08:37 PM   #2 (permalink)
Baez's Avatar
 

Join Date: Sep 2005

Location: Toronto, Canada

Posts: 5,466

Baez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of light

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

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.
__________________


Last edited by Baez; 09-15-2008 at 03:45 AM.
Baez is offline  
Old 09-14-2008, 08:58 PM   #3 (permalink)
Saxon's Avatar
 

Join Date: Feb 2007

Posts: 6,362

Saxon is just really niceSaxon is just really niceSaxon is just really niceSaxon is just really nice

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

cvb724 - thanks mate I will try that in the morning an let you know how it works.
__________________
I am not here for long I am deploying soon so please don't expect anything long winded.

Saxon is offline  
Old 09-15-2008, 03:39 AM   #4 (permalink)
Baez's Avatar
 

Join Date: Sep 2005

Location: Toronto, Canada

Posts: 5,466

Baez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of light

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

No prob man.
__________________

Baez is offline  
Old 09-15-2008, 08:14 AM   #5 (permalink)
Saxon's Avatar
 

Join Date: Feb 2007

Posts: 6,362

Saxon is just really niceSaxon is just really niceSaxon is just really niceSaxon is just really nice

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

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.
__________________
I am not here for long I am deploying soon so please don't expect anything long winded.

Saxon is offline  
Old 09-15-2008, 04:36 PM   #6 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,683

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: Would it be possable for a .bat file to add a user in XP?

Chris would be the name of the username you want to create.
__________________

Need website help? PM me!
CrazeD is offline  
Old 09-15-2008, 10:40 PM   #7 (permalink)
Mak213's Avatar
 

Join Date: Sep 2004

Location: C:\Windows\System32

Posts: 25,657

Mak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to all

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

Quote:
Originally Posted by Saxon View Post
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.
__________________
R.I.P. Danny L. Trotter
14 Nov 1945 - 4 Sept 2009
Images created by CarnageX | Decaptured...Listen! | Visit Baezware!! | You've been Mak'd! | 儿做好
I do not accept support questions via EMail, PM, IM or my Spaces page! .:|:. This is what happens when an unstoppable force meets an immovable object.
Thanks to all the guys on the staff for your support in my time of need. Hefe you are my personal Hero for your contribution.



<<<< If I help you, or you just like what I said, rep me
Mak213 is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A sneaky, and annoying virus donaldj HijackThis Logs (finished) 25 06-16-2008 08:58 PM
Possible Corrupted/Infected Files. xXxexpertxXx Virus - Spyware Protection / Detection 11 03-12-2008 01:18 AM
WTF is a Bad Block? MikesCreation Hardware Troubleshooting 18 02-24-2008 09:31 PM
seagate 80gigs failing.. acuariano Hardware Troubleshooting 27 08-27-2007 10:43 PM
Another Hijack Log boo HijackThis Logs (finished) 17 06-26-2007 12:30 PM