Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- cls
- setlocal
- REM ###############################
- REM # Day-to-Day Account Management
- REM ###############################
- :mainMenu
- echo.
- echo YOU MUST RUN THIS AS AN ADMINISTRATOR
- echo.
- echo #####################################
- echo # 1. Remove an Account
- echo # 2. Change an Account Password
- echo # 3. Create an Administrative Account
- echo # 4. Drop Back To A Command Prompt
- echo #####################################
- echo.
- set /p varChoice="Enter An Option: "
- if %varChoice%==1 goto :removeAccount
- if %varChoice%==2 goto :changePassword
- if %varChoice%==3 goto :addAdminAccount
- if %varChoice%==4 goto :eof
- :removeAccount
- set /p varUser="Please Enter A UserName e.g. uname: "
- net user %varUser% /delete
- :changePassword
- set /p varUser="Please Enter A UserName e.g. uname: "
- set /p varPassword="Please Enter A Password e.g. 1myPassword: "
- net user %varUser% %varPassword%
- :addAdminAccount
- set /p varUser="Please Enter A UserName e.g. uname: "
- set /p varPassword="Please Enter A Password e.g. 1myPassword: "
- net user %varUser% %varPassword% /add
- net localgroup administrators %varUser% /add
- goto :mainMenu
- endlocal
- REM #############
- REM # START NOTES
- REM #############
- REM ###########
- REM # END NOTES
- REM ###########
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement