Advertisement
ozakisama

OS - Create new Account

Jan 21st, 2016
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.82 KB | None | 0 0
  1. :reg
  2. @echo off
  3. cls
  4. color a
  5. TITLE Bautista Project
  6. mode CON: COLS=80 lines=20
  7. setlocal EnableDelayedExpansion
  8. @echo %date%
  9. @echo  _____________________________
  10. @echo ^|                             ^|
  11. @echo ^|      Create new account     ^|
  12. @echo +_____________________________+
  13. echo.
  14. Set usr=
  15. set /p usr=Enter new username:
  16. Set pwd=
  17. set /p pwd=Enter new password:
  18. if not defined pwd goto try
  19. set rpwd=
  20. set /p rpwd=Retype new password:
  21. if not defined rpwd goto try
  22.  
  23. if not defined usr goto try
  24.  
  25. if %pwd%==%rpwd% (
  26.     echo %usr%>file.txt
  27.     echo %pwd%>>file.txt
  28.     goto success
  29. ) else (
  30.     echo.
  31.     echo Password doesn't matched. Please try again.
  32.     pause>nul
  33.     goto reg
  34. )
  35.  
  36. :success
  37. cls
  38. echo.
  39. echo Successfully registered
  40. pause>nul
  41. call main.bat
  42.  
  43. :try
  44. echo Please complete all fields
  45. pause>nul
  46. goto reg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement