Introduction: Different Method of Adding Password to Batch File


This isntsructable will show you an alternative method of adding a username and password to a batch file. I have not seen very many people use this method before, I learned it when I lost my internet for a while and did allot of playing around with stuff.

I also included bat to exe converter for those of you that are like me out there, lol

Step 1: This Is the Code

@ECHO OFF
TITLE Login Script
COLOR 0a
:USERID
CLS
ECHO Enter User ID:
ECHO > NUL
SET /p USERID=
IF %USERID% EQU Eastern.Dragon GOTO PASSWORD
IF %USERID% LSS Eastern.Dragon GOTO INVALID
IF %USERID% GTR Eastern.Dragon GOTO INVALID
:PASSWORD
CLS
ECHO Enter autherization code:
SET /p PASSWORD=
IF %PASSWORD% EQU Nemraiku22159 GOTO MAIN
IF %PASSWORD% LSS Nemraiku22159 GOTO INVALID
IF %PASSWORD% GTR Nemraiku22159 GOTO INVALID
:INVALID
CLS
ECHO INAVLID LOGIN.....
PING -n 3 127.0.0.1 > NUL
ECHO Please try again...
PING -n 3 127.0.0.1 > NUL
GOTO USERID
:MAIN
ECHO Welcome Nemraiku...
PING -n 3 127.0.0.1 > NUL



You will need to replace Eastern.Dragon with your own personnel username and replace Nemraiku22159 with you own password.