Computer ForumsComputers  

Go Back   Computer Forums > Programmers Lounge > Programming Discussions

Reply
 
LinkBack Thread Tools Display Modes
Old 09-14-2008, 06:39 PM   #1 (permalink)
call me... tater salad
 
Saxon's Avatar
 
Join Date: Feb 2007
Posts: 3,600
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.
__________________
8GB DDR2 800, Asus M2N-SLI, AMD 4200+ X2, 500GB SATA + 250 SATA, Asus 8500GTS silent 512mb, Debian Linux, FreeBSD7, Solaris.

Isaac is coming...

Saxon is online now   Reply With Quote
Old 09-14-2008, 08:37 PM   #2 (permalink)
Virgin Techie
 
Baez's Avatar
 
Join Date: Sep 2005
Location: Toronto, Canada
Posts: 2,694
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   Reply With Quote
Old 09-14-2008, 08:58 PM   #3 (permalink)
call me... tater salad
 
Saxon's Avatar
 
Join Date: Feb 2007
Posts: 3,600
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.
__________________
8GB DDR2 800, Asus M2N-SLI, AMD 4200+ X2, 500GB SATA + 250 SATA, Asus 8500GTS silent 512mb, Debian Linux, FreeBSD7, Solaris.

Isaac is coming...

Saxon is online now   Reply With Quote
Old 09-15-2008, 03:39 AM   #4 (permalink)
Virgin Techie
 
Baez's Avatar
 
Join Date: Sep 2005
Location: Toronto, Canada
Posts: 2,694
Default Re: Would it be possable for a .bat file to add a user in XP?

No prob man.
__________________




Baez is offline   Reply With Quote
Old 09-15-2008, 08:14 AM   #5 (permalink)
call me... tater salad
 
Saxon's Avatar
 
Join Date: Feb 2007
Posts: 3,600
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.
__________________
8GB DDR2 800, Asus M2N-SLI, AMD 4200+ X2, 500GB SATA + 250 SATA, Asus 8500GTS silent 512mb, Debian Linux, FreeBSD7, Solaris.

Isaac is coming...

Saxon is online now   Reply With Quote
Old 09-15-2008, 04:36 PM   #6 (permalink)
Master Techie
 
CrazeD's Avatar
 
Join Date: Feb 2006
Location: Maine
Posts: 2,886
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!

Join Tech-Forums Gaming Party (WAN)!
CrazeD is offline   Reply With Quote
Old 09-15-2008, 10:40 PM   #7 (permalink)
Commander
Super Mod
Joker
 
Mak213's Avatar
 
Join Date: Sep 2004
Location: Trotter's Basement
Posts: 16,980
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.
__________________
Google...USE IT | There is a EDIT button. Use It and don't multiple post. | Image created by CarnageX


Mak213 is online now   Reply With Quote
Reply

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


All times are GMT -5. The time now is 09:12 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0