Here's a small program which lets you register and login in batch hope you enjoy!
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Setting Up
So what you need is a map with another map inside of it, this makes it easier for data reference
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)
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)'
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)
set /p user=""
REM we save the username in a .dll file in the Data map
REM together with the 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
echo Successfully registered
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)
set /p user2=""
if Not exist %user2%.dll goto loginfail
for /f "Delims=" %%a in (%user2%.dll) do (
set /p pass2=""
if %pass2%==%passconfirm% goto loginsuccess
if not %pass2%==%passconfirm% goto loginfail
echo Good job you successfully registered
echo and logged on to your account
echo NOTE: it's case sensitive!
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)