Advertisement
Guest User

Untitled

a guest
Apr 8th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. @echo off
  2. title Program Selector 2.0 by xiTe
  3. cls
  4.  
  5. set tries=3
  6.  
  7. :usercheck
  8. if exist username.txt (
  9. goto passcheck
  10. ) else (
  11. goto userinput
  12. )
  13.  
  14. :passcheck
  15. if exist password.txt (
  16. goto login
  17. ) else (
  18. goto passwinput
  19. )
  20.  
  21.  
  22. :userinput
  23. set setusername=
  24. set /P setusername=Choose username: %=%
  25. echo Your username is: %setusername%
  26. pause
  27. echo %setusername% >>username.txt
  28. cls
  29.  
  30. :passwinput
  31. set setpassword=
  32. set /P setpassword=Choose password: %=%
  33. echo Your password is: %setpassword%
  34. pause
  35. echo %setpassword% >>password.txt
  36. cls
  37.  
  38.  
  39. :login
  40.  
  41. :tries
  42. set /a tries=%tries% -1
  43. if %tries%==0 (
  44. goto exit
  45. )
  46.  
  47. :username
  48. color 0f
  49. set /p user=Enter Username:
  50. if %user% == %setusername% (goto password) else (goto denied)
  51. cls
  52.  
  53. :password
  54. cls
  55. set /p passw=Enter Password:
  56. if %passw% == %setpassword% (goto granted) else (goto denied)
  57. cls
  58.  
  59. :denied
  60. cls
  61. color 0c
  62. echo Access Denied
  63. echo You have %tries% attempts left.
  64. pause
  65. cls
  66. goto tries
  67.  
  68. :granted
  69. cls
  70. color 0a
  71. echo Access Granted
  72. pause
  73. cls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement