Batch Login Screen

Introduction: Batch Login Screen

Here's a small program which lets you register and login in batch hope you enjoy!

Step 1: Setting Up

So what you need is a map with another map inside of it, this makes it easier for data reference

(see pic)

Step 2: The Starting Screen

Here we'll create the screen you'll see when opening the program

(NOTE: i typed 'cd Log-Data' in the code in the pic but this returns an error use 'Log' as map name)

@echo off

REM this refers to the second map you made, in this case the name of the map

REM as long as the program and the desired map are in the same directory you can simply type 'cd (map name)'

cd Log



color F0

REM this is for displaying the screen use your own creativity here to make it really shine

echo Login, Register


echo (L)ogin (R)egister

set /p logreg=""

if %logreg%==L goto login

if %logreg%==l goto login

if %logreg%==R goto register

if %logreg%==r goto register





Step 3: The Register Screen

So obviously after the user gave his input we want it to go somewhere,

here we'll handle the action took when the user wants to register as a new user!

(NOTE: we are starting from the :register command)



echo Register


echo Username?:

set /p user=""

REM we save the username in a .dll file in the Data map

REM together with the password


echo Password?:

set /p pass=""

REM we export it here

REM we use a dll file because it's harder to read as a user, you could save it in a txt too!

echo %pass% >%user%.dll

goto regsuccess



echo Successfully registered


echo %user%


echo %pass%


goto start

Step 4: Login Screen; Login Fail; Login Success

We want more than only being able to register a user we also want to make them login,

this will be done in this step!

(Note: We are starting from the :login command)



echo Login


echo Username?:

set /p user2=""

if Not exist %user2%.dll goto loginfail

for /f "Delims=" %%a in (%user2%.dll) do (

set passconfirm=%%a



echo Password?:

set /p pass2=""

if %pass2%==%passconfirm% goto loginsuccess

if not %pass2%==%passconfirm% goto loginfail



echo success


echo Good job you successfully registered

echo and logged on to your account


goto start



echo failed


echo NOTE: it's case sensitive!


goto start

Step 5: Download File (if You Want)

you can download the program if you really don't want to do it yourself


(you still need to make the maps, this is only the txt file)



    • Fix It! Contest

      Fix It! Contest
    • Tiny Home Contest

      Tiny Home Contest
    • Metalworking Contest

      Metalworking Contest

    7 Discussions

    Very nice instructable! For some reason, the text file from onedrive does not work. Any way that you could please fix that. I would appriciate it! Thx!

    3 replies

    here's a new link, although i did not have any problems with it maybe it's onedrive?

    if there happens to be more problems just let me know,

    thank you for submitting the error i'll make sure to use another site.


    2 years ago

    nice tutorial, you can write: if /l %logreg%==l goto login
    in order to compare string case insensitive.

    1 reply

    the thing is i want to keep it as simple as possible with tutorials