An Autorun.inf file is a file that, when placed on a drive (internal or external), will allow the drive to start programs, have a different icon than the standard boring one (LOTS OF FUN TO MESS WITH), and have a different name. The syntax is "option=value". Examples will be given later on.
Continue if you want to learn more.
ANOTHER UPDATE ON PAGE 4
Step 1: A Basic Autorun File
Open Notepad (or Notepad++ or what ever you use) and type the following:
BEFORE YOU SAVE IT!
Where it says autorun, insert brackets around the word. I cannot type this in the Instructable, as it the Instructable creating software would turn the word into a link. Refer to the picture for the correct format.
Here is what you typed:
autorun: This states that this is an Autorun file, and what follows describes what the drive will look like and how it will act.
icon: This will change the icon of the drive (in the "My Computer" screen) to a custom one that you choose. The picture you choose must be an icon file (it must have the extension ".ico"). You can get pictures of that format from http://www.iconarchive.com/ and many other websites.
label: This will change the name of the drive to whatever you choose, as long as what you choose does not contain too many characters.
OK. Save the file to the main directory on your drive ("My Computer, Removable Drive X"). Eject the drive, then plug it back in. If you saved it to an internal hard drive, you will have to restart the computer.
If you are adding an icon to the drive, you will need to have an icon file to go use. An icon file is NOT a picture you got off the internet. It must have the extension ".ico". If it does not, then it will not work. Place the icon in the same directory as the Autorun file. Once you have done this, go back into the Autorun file and change the line that says icon=NAME.ico to have the name of the icon (keep the part that has the ".ico".
Step 2: A More Complex Autorun
Type the following into Notepad or Notepad++:
This is a short explanation of the new stuff you just typed:
open: Duh. This will open a file that you choose. If that file is in a folder, you would type the following:
action: This is what you want the option to be called. If you remember, the option's name on the first page was "Heal People". Refer to the picture to see what I mean.
Step 3: An Autorun file with extra Commands
If you lose your USB drive often, you should 1) buy a keychain for it and 2) add this to your Autorun file:
shell\lost=Help! I'm Lost
NOTE: This command is not only for a lost USB drive. You can make it anything you want.
shell\lost\command=: This is the file that will open when you click on the "Help! I'm Lost" command.
shell\lost=: This is what the name of the command is. Look at the picture for more information.
Also, the computer does not have a file called "Lost.bat" already on it (duh). You will have to make one. This is some good code for the batch file:
title Please Return Me!
echo I have been lost! Please return me to my owner!
echo 1234 Second St. Small Town, America, 12345
I have written this code so that if someone presses a key (like the file asks you to, see the screenshot), it will simply repeat itself! It will continue to do this untill the finder of the drive closes out of the CMD window.
PLEASE make sure that you replace the info with your actual address, phone number, and email (unless you happen to live at 1234 Second Street, Small Town, America, 12345).
There are countless possibilities that you can place here. Also, you can insert more than one, so you could have a "Help Me" option, a "Hello" option, and a "Destroy the Earth" option. Have fun with that (and be legal!).
Step 4: The End
Feel free to leave comments, give suggestions, make corrections, and vote.
If you have trouble making the autorun file, you can download the text file version of one I made. Just replace the information inside it and save it as a .inf file.
ALSO, the icon and open fields cannot have multiple words in them. Use the underscore symbol if you have to, but NO spaces.