Subscribe to MORPH        RSS Feed
-----

Batch sign-in script

Icon Leave Comment
Batch sign-in script. This script is limited though, because you have to program the username/password in the actual program.
Refer to my other blog post to see a better user system.

:MAIN
cls
echo.
echo Enter your username
echo.
set /p "username= > "
if %username%==USERNAME1 goto PASSWORD
goto ERROR1
:ERROR1
echo.
echo The username was not found, please try again.
echo.
pause
goto MAIN
:PASSWORD
cls
echo.
echo Enter your password
echo.
set /p "password= > "
if %password%==PASSWORD1 goto OK
goto ERROR2
:ERROR2
echo.
echo The password is incorrect, please try again.
echo.
pause
goto PASSWORD
:OK
cls
echo.
echo Welcome %username%,
if %password%==PASSWORD1 goto PROGRAM
echo.
pause
:PROGRAM
REM Program Here!

0 Comments On This Entry

 

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

October 2017

S M T W T F S
1234567
891011121314
15 16 1718192021
22232425262728
293031    

Recent Entries

Search My Blog

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)

Categories