http://www.gamexe.net/forum/archive.php ... orial.html
Access Granted...OR DENIED?
Yes that is the name lol. Today we will be using the IF command. When you open this batch it will ask for a password. If it's wrong it will say "Access denied" and if it's right it will say "Access granted" then it will exit. Good for hiding stuff(removing the exit command, that is)
As usual, start off any batch file like usual.
Code: @echo off
cls
Now we want it to say "Put in a password" type thingo, you know what I'm talking about. So let's have this:
Code:
@echo off
cls
echo Please enter a password:
Oh yay! Now for the IF command. This command is what it is. If. Example would be IF a user did this, open Google etc. So, we will add that when the user enters the correct password, it will go to Access granted, if not it will go to Access denied. So now it should look like this:
Code:
@echo off
cls
echo Please enter a password:
set /p inputchoice=
IF %inputchoice% equ gamingexe goto accessgranted
The password for this is: gamingexe, as you can see in the script. Now we want the access grant/deny thing. Script should now be:
Code:
@echo off
cls
echo Please enter a password:
set /p inputchoice=
IF %inputchoice% equ gamingexe goto accessgranted
echo.
echo.
echo Access Denied
pause
exit
:accessgranted
cls
echo Access Granted.
pause
exit
If you look in the IF script line, at the end it says goto. So when they type the correct password it will go to :accessgranted and execute the command. Oh-ho, done! Have some fun with it, mess around...don't just copy mine! lol.
Code:
@echo off
cls
echo Please enter a password:
set /p inputchoice=
IF %inputchoice% equ lolol goto accessgranted
:deny
echo.
echo.
echo Access Denied - YOU FAIL! MAELSTROM HAS DEFEATED YOU! RAWR! Erm...try again!
start
http://www.gamexe.net
echo Please enter password:
set /p inputchoice=
IF %inputchoice% equ lolol goto accessgranted
goto deny
:accessgranted
cls
echo Access Granted.
pause
exit
This one I just did will open GamingExe everytime they fail to type the password "lolol"
Enjoy
I'm just copy and pasting to here

I know people are computer protective so I added a lot of "no damage to your system" stuff.
What is a batch file?
A batch file is a file with the file extension ".bat" These files open MS-DOS(the command line prompt) and executes the script in the file.
So, what will this file you are about to teach me do?
Here is an overlook at what this file will do when executed:
1. It will swap the right and left click functions with each other so that left click is right click and right click is left click.
2. It will open 2 browsers at a time to the sites Google and Yahoo! everytime this file gets to that part of the script(how can you do that? read 4)
3. This file will have annoying pop up messages in the cmd with an annoying beep sound.
4. How can all this be repeated? All with the GOTO command. Read below.
Creating the file
So lets get down to business. Open Notepad. This is where you will write it. All files should start with:
:ECHO
cls
So in notepad you should have that. Now, what makes this file annoying is how it switches the mouse buttons. We will use the "rundll32" command to switch the buttons. This command can control any module on the computer(Mouse, Keyboard etc) so what we are going to do is switch the mouse buttons. This is now what your script in Notepad should look like:
:ECHO
cls
Rundll32 user32,SwapMouseButton
So far...so good. Next we will add the MSG command. This command will message the user specified and add an annoying "beep" sound. So we will target this to the admin, guest and owner because we don't know what user they are under. Your script should now be:
:ECHO
cls
Rundll32 user32,SwapMouseButton
cls
MSG owner This is quite annoying I bet
cls
MSG owner Only you can prevent forest fires!
cls
MSG Administrator This is quite annoying I bet
cls
MSG Administrator YOU'LL PAY FOR THIS, CAPTAIN PLANET
cls
MSG Guest Y HALO THAR!
cls
MSG Guest Hello
cls
So now for the browser opening. We will use the START command. This command can open any application that you direct it towards. So we will start 2 browsers. Your script should now be:
:ECHO
cls
Rundll32 user32,SwapMouseButton
cls
MSG owner This is quite annoying I bet
cls
MSG owner Only you can prevent forest fires!
cls
MSG Administrator This is quite annoying I bet
cls
MSG Administrator YOU'LL PAY FOR THIS, CAPTAIN PLANET
cls
MSG Guest Y HALO THAR!
cls
MSG Guest Hello
cls
start
http://www.google.com
start
http://www.yahoo.com
Maelstrom, how do we repeat the effect?
Simple. The GOTO command. If we direct the GOTO command to ECHO, it will repeat the file from the top over and over again. So at the end of your script put "goto ECHO" Your final result is:
:ECHO
cls
Rundll32 user32,SwapMouseButton
cls
MSG owner This is quite annoying I bet
cls
MSG owner Only you can prevent forest fires!
cls
MSG Administrator This is quite annoying I bet
cls
MSG Administrator YOU'LL PAY FOR THIS, CAPTAIN PLANET
cls
MSG Guest Y HALO THAR!
cls
MSG Guest Hello
cls
start
http://www.google.com
start
http://www.yahoo.com
goto ECHO
Wait....Notepad only saves text documents!!!11one
Save your file with .bat at the end of the name. Example: "Funny Video.bat" for a file name will make the file a batch file.
So...why should I send this to people? And how?
Well this tutorial is more for educational purposes and can be used as a great prank. So I ask any moderator or administrator to not delete this topic because I find nothing wrong with it because it will not harm any computer in any shape or form. It's simply a prank. To send it on AIM you will just need to send the file by File>Send File. For MSN you will need to store this in a .zip file to send because MSN says all batch files are bad. You can also download a .bat to .exe converter so it's less detectable by their virus programs. The ONLY reason why this triggers their virus detecting programs is because it's a batch file. ANY batch file would trigger an anti-virus program.
__________
There you have it, enjoy! Again, I ask that nobody delete or lock this topic just because I find nothing wrong with it and it's simply a prank. Nothing deadly. I also recommend you run the file yourself to see if it works. You can ask questions to me on AIM or MSN. Comments can be posted here.
Thank you, enjoy
http://www.howtogeek.com/howto/windows/ ... mand-line/