Mnemosyne Posted January 31, 2008 Share Posted January 31, 2008 anyone know a simple script for creating a local user account on xp ... thanks Link to comment Share on other sites More sharing options...
Mattraks Posted January 31, 2008 Share Posted January 31, 2008 Just make it run a file i think would be net user USERNAMEHERE PASSWORDORNOTHINGHERE /add Link to comment Share on other sites More sharing options...
Mnemosyne Posted January 31, 2008 Author Share Posted January 31, 2008 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 .. Link to comment Share on other sites More sharing options...
Pioneer5250 Posted January 31, 2008 Share Posted January 31, 2008 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) Link to comment Share on other sites More sharing options...
Mnemosyne Posted January 31, 2008 Author Share Posted January 31, 2008 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now