Introduction: Batch Secret "Newspaper"
Hello Instructables! I'm BatchBum and I make batch scripts. Today I will be making a computer newspaper that can only be opened with a password. I would like to give thanks to Braydon T for giving me a new command! Also I will be making my Instructable easier to understand. P.S. Any bolded words are not commands they are just there so you don't get them mixed up with commands.
Step 1: Runthrough
Here are some common commands for beginners:
@echo off: Turns off that C:\Users\Username\ junk.
cls: Clears the page. (Keeps it nice and neat.)
echo.: Just spacing so your writing doesn't jet all cramped together.
echo: Put this be for any text you want to write.(e.g. echo Hello Everyone!)
pause: Makes the file say Press any key to continue... And it does make you.
exit: This is pretty self explanatory, but exits out of the batch script.
set /p WHATEVER: Just a choice command, except WHATEVER is not a command it is just in place for another of the many commands.
if: Another command for choice but it is used in set /p ---.
•: This isn't really a command but a makes a single beep for every bullet point.
color: Changes the color of background or text.
timeout: A timer that counts down an amount of numbers you set
Step 2: Notepad
Open notepad. This script will work with Windows XP, 7, and 8. No promises with Windows 95, 98, or older.
Step 3: Copy and Paste
Copy and paste the following commands into notepad:
echo Welcome to the computer newspaper! What's the password?
set /p variable=
if %variable% equ yourpass goto 1
if %variable% neq yourpass goto 2
echo WRONG!!! ERROR CODE jhfdjw0084
echo BLAH BLAH BLAH
In two places it says yourpass change that to the password you want. Also in another place it says BLAH BLAH BLAH change the to whatever juicy information you want for your newspaper.
Step 4: Finish
When ever you wantto change the info just right click the icon of your file and press edit. When you are done copying and paisting save your notepad file to SecretN.bat REMEMBER to put the .bat or it won't work. Always remember to keep your newspaper stocked up with the latest and juiciest information so your "readers" always have the latest.
Step 5: Pictures
Here are some pictures of how your script should of turned out.
Step 6: Thank You!
You may have noticed some of the styles of my other instuctables have changed. That's just because I am trying to find a style to do my instuctables. Keep liking commenting and following so I know I should keep making Instructables.