Sign in to follow this  
Followers 0
Mnemosyne

local user account

5 posts in this topic

anyone know a simple script for creating a local user account on xp ... thanks

Share this post


Link to post
Share on other sites



Just make it run a file i think would be

net user USERNAMEHERE PASSWORDORNOTHINGHERE /add

Share this post


Link to post
Share on other sites

Just make it run a file i think would be

net user USERNAMEHERE PASSWORDORNOTHINGHERE /add

thanks but i need to add it to the local admin group too ..

Share this post


Link to post
Share on other sites

Try this!

$sUsername = InputBox("Enter Username","Please enter the required username!",""," ","-1","130","-1","-1")
$sPassword = InputBox("Enter Password","Please enter the users password!","","*","-1","130","-1","-1")
$sGroup = InputBox("Enter Group","Please enter the required group!",""," ","-1","130","-1","-1")

Run(@ComSpec & ' /k net user ' & $sUsername & ' ' & $sPassword & ' /add', @SystemDir, @SW_HIDE)
Sleep(1000)
Run(@ComSpec & ' /k net localgroup ' & $sGroup & ' ' & $sUsername & ' /add', @SystemDir, @SW_HIDE)

Share this post


Link to post
Share on other sites

Try this!

$sUsername = InputBox("Enter Username","Please enter the required username!",""," ","-1","130","-1","-1")
$sPassword = InputBox("Enter Password","Please enter the users password!","","*","-1","130","-1","-1")
$sGroup = InputBox("Enter Group","Please enter the required group!",""," ","-1","130","-1","-1")

Run(@ComSpec & ' /k net user ' & $sUsername & ' ' & $sPassword & ' /add', @SystemDir, @SW_HIDE)
Sleep(1000)
Run(@ComSpec & ' /k net localgroup ' & $sGroup & ' ' & $sUsername & ' /add', @SystemDir, @SW_HIDE)

Thanks - works great but puts user in the restricted group though the Administrators group is specified ... and thanks for the code

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0