Introduction: Password Batch

Hey there Instructables community! I'v decided to share to you how to make a very simple Password Batch file that will run through the command prompt. This is my very first Instructable, so please be gentle with the comments, but tell me if theres anything that needs to be added or clarified. Ready? LETS DO THIS!

Step 1: What You Need to Know

First off, you need some basic training in batch scripting if you have no clue as to what your doing!
If you already know, please, feel free to skip ahead to step 2. But here I will give you some of the basic "vocab" you will see in many basic batch files.
To start, you will almost always need to start your batch file off with this first line
"@ echo off" This line allows you to create text in your batch file with the "Echo" command, and it makes sure you don't see the "echo" part while the file is running.
"Echo" command is the syntax that allows for text to be seen in the batch file. simply use this line of code to create any text you wish
"Echo Your Text Here"
The third most common script you will see in this instructable is the "ping localhost" line. What this does is wait a set amount of time (in seconds) until the next line of script can be run. The command is as follows...
"ping localhost -n {time in seconds here} >nul"
Then to close any script of the entire program, depending on where you put this code, use this...
"cls"
this really doesn't need to be explained too much more.
And finally, before any of this can begin, you must have Notepad open in order to do any scripting.
Pleas continue to Step 2.

Step 2: The Scripting

Now, for you more advanced scriptors, you may wish to just follow the code and type it in yourself s for a more "self satisfaction" feeling, but if your anything like me, and your too lazy and just want the project done to keep your annoying siblings, parents, or roommates out of your system, then just simple copy and paste the code into notepad, and make sure you save it with an ending of ".bat" instead of ".txt" this will change it into a batch file that you can run. Here is the code for ya! What this does is gives you a total of 5 tries to get the password right. Should a wrong password be entered after those five tries, well, I've given the program a bit of a surprise. Jurassic Park fans will notice that under the ":penalty" codes, it will spell out "Ah Ah Ah, You Didn't Say The Magic Word" over and 5 times until "Shutdown" command is activated. Simple, No?

@ Echo off
color C
Title Welcome Back
set tries=6
:top
cls
set /a tries=%tries% -1
if %tries%==0 (
goto penalty
)
Echo You have %tries% attempts left.
Echo Please enter your password to proceed
set /p password=
if %password%==Your Password Here (
echo Welcome Your Name
ping localhost -n 5 >nul
cls
Echo CONNECTED!
pause
cls
) else (
goto top
)
goto top
:penalty
echo A
ping localhost -n .15 >nul
cls
echo Ah
ping localhost -n .15 >nul
cls
echo Ah A
ping localhost -n .15 >nul
cls
echo Ah Ah
ping localhost -n .15 >nul
cls
echo Ah Ah A
ping localhost -n .15 >nul
cls
echo Ah Ah Ah
ping localhost -n .15 >nul
cls
echo Ah Ah Ah,
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, Y
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, Yo
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You D
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Di
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Did
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn'
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't S
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Sa
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say T
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say Th
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The M
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The Ma
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The Mag
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magi
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic W
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic Wo
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic Wor
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic Word
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic Word.
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic Word..
ping localhost -n .15 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic Word...
ping localhost -n 5 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic Word...
ping localhost -n 5 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic Word...
ping localhost -n 5 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic Word...
ping localhost -n 5 >nul
cls
echo Ah Ah Ah, You Didn't Say The Magic Word...
ping localhost -n 5 >nul
cls
shutdown -s -f -t 15 -c "Next Time, Just Ask Me For The Magic Word"

Step 3: Now for the Fun Part

Ok guys and gals, i have provided the code, as well as an explanation of what it does. I want to point out that this instructable was created FOR INSTRUCTIONAL PURPOSES ONLY! What you do with this script is solely on you, and not Me, or this wonderful site. I want to take a moment and remind all coders and scriptors that inserting and running of malicious files or data on anyone's computer besides your own is ILLEGAL! And, depending on your age, can end you up in Prison! This batch job will cause no damage to the files or computers that it is placed on, it is meant as pure fun, as well as security.
Now, to get this batch file to run upon logon, all you have to do is go "Control Panel" then to "Performance and Maintenance" then to "Scheduled Tasks" from there it's a simple process to schedule the batch file to run when you logon.

Step 4: Wrap Up

OK, now if you did everything as I have said, this program should run with no issues! .
Now, to take it one step further you can convert the .bat file to a .exe so that the coding can never be edited, and you can up your security one more level! Just google it, not that hard to find a good site to do it for you! Enjoy! hope you will come back to me for all you scripting needs!
-Necrohero