Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- title Program Selector 2.0 by xiTe
- cls
- set tries=3
- set /p user=<"C:\Program Selector 2.0\username.txt"
- set /p pass=<"C:\Program Selector 2.0\password.txt"
- :usercheck
- if exist username.txt (
- goto passcheck
- ) else (
- goto userinput
- )
- :passcheck
- if exist password.txt (
- goto login
- ) else (
- goto passwinput
- )
- :userinput
- set setusername=
- set /P setusername=Choose username: %=%
- echo Your username is: %setusername%
- pause
- echo %setusername% >>username.txt
- cls
- :passwinput
- set setpassword=
- set /P setpassword=Choose password: %=%
- echo Your password is: %setpassword%
- pause
- echo %setpassword% >>password.txt
- cls
- :login
- if %tries%==0 (
- echo Program terminating.
- exit
- )
- :username
- color 0f
- set /p uinput=Enter Username:
- if %uinput% == %user% (goto password) else (goto denied)
- cls
- :password
- cls
- set /p pinput=Enter Password:
- if %pinput% == %pass% (goto granted) else (goto denied)
- cls
- :denied
- cls
- color 0c
- echo Access Denied
- set /a tries=%tries% -1
- echo You have %tries% attempts left.
- pause
- cls
- goto login
- :granted
- cls
- color 0a
- echo Access Granted
- pause
- cls
- :menu
- cls
- color 0f
- ECHO.
- ECHO ...............................................
- ECHO PRESS 1, 2, 3 or 4 to select your task, or 5 to EXIT.
- ECHO ...............................................
- ECHO.
- ECHO 1 - Launch existing preset
- ECHO 2 - Create new preset
- ECHO 3 - Delete existing preset
- ECHO 4 - Change password
- ECHO 5 - EXIT
- ECHO.
- CHOICE /C:12345
- cls
- IF ERRORLEVEL 1 SET M=1
- IF ERRORLEVEL 2 SET M=2
- IF ERRORLEVEL 3 SET M=3
- IF ERRORLEVEL 4 SET M=4
- IF ERRORLEVEL 5 SET M=5
- IF %M%==1 GOTO exp
- IF %M%==2 GOTO newp
- IF %M%==3 GOTO delp
- IF %M%==4 GOTO chpassw
- IF %M%==5 exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement