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.72 KB | None | 0 0
  1. @echo off
  2. title Program Selector 2.0 by xiTe
  3. cls
  4.  
  5. set tries=3
  6. set /p user=<"C:\Program Selector 2.0\username.txt"
  7. set /p pass=<"C:\Program Selector 2.0\password.txt"
  8.  
  9. :usercheck
  10. if exist username.txt (
  11. goto passcheck
  12. ) else (
  13. goto userinput
  14. )
  15.  
  16. :passcheck
  17. if exist password.txt (
  18. goto login
  19. ) else (
  20. goto passwinput
  21. )
  22.  
  23.  
  24. :userinput
  25. set setusername=
  26. set /P setusername=Choose username: %=%
  27. echo Your username is: %setusername%
  28. pause
  29. echo %setusername% >>username.txt
  30. cls
  31.  
  32. :passwinput
  33. set setpassword=
  34. set /P setpassword=Choose password: %=%
  35. echo Your password is: %setpassword%
  36. pause
  37. echo %setpassword% >>password.txt
  38. cls
  39.  
  40.  
  41. :login
  42.  
  43. if %tries%==0 (
  44. echo Program terminating.
  45. exit
  46. )
  47.  
  48. :username
  49. color 0f
  50. set /p uinput=Enter Username:
  51. if %uinput% == %user% (goto password) else (goto denied)
  52. cls
  53.  
  54. :password
  55. cls
  56. set /p pinput=Enter Password:
  57. if %pinput% == %pass% (goto granted) else (goto denied)
  58. cls
  59.  
  60. :denied
  61. cls
  62. color 0c
  63. echo Access Denied
  64. set /a tries=%tries% -1
  65. echo You have %tries% attempts left.
  66. pause
  67. cls
  68. goto login
  69.  
  70. :granted
  71. cls
  72. color 0a
  73. echo Access Granted
  74. pause
  75. cls
  76.  
  77. :menu
  78. cls
  79. color 0f
  80. ECHO.
  81. ECHO ...............................................
  82. ECHO PRESS 1, 2, 3 or 4 to select your task, or 5 to EXIT.
  83. ECHO ...............................................
  84. ECHO.
  85. ECHO 1 - Launch existing preset
  86. ECHO 2 - Create new preset
  87. ECHO 3 - Delete existing preset
  88. ECHO 4 - Change password
  89. ECHO 5 - EXIT
  90. ECHO.
  91.  
  92. CHOICE /C:12345
  93. cls
  94. IF ERRORLEVEL 1 SET M=1
  95. IF ERRORLEVEL 2 SET M=2
  96. IF ERRORLEVEL 3 SET M=3
  97. IF ERRORLEVEL 4 SET M=4
  98. IF ERRORLEVEL 5 SET M=5
  99. IF %M%==1 GOTO exp
  100. IF %M%==2 GOTO newp
  101. IF %M%==3 GOTO delp
  102. IF %M%==4 GOTO chpassw
  103. IF %M%==5 exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement