How to make an Autorun.inf File

 by Crazy Leprecaun
main.bmp
In a previous Instructable, I went over this quickly and did not explain it very well. I was asked to make a full Instructable on Autorun.inf files, and here it is.

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
 
Remove these adsRemove these ads by Signing Up

Step 1: A Basic Autorun File

In this step, we will make a basic, do-nothing Autorun file. All that will change is the name of the USB drive, and the icon that goes with it.

Open Notepad (or Notepad++ or what ever you use) and type the following:

autorun
icon=NAME.ico
label=NAME

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".
1-40 of 66Next »
M.Shadow klon says: May 17, 2013. 7:53 AM
the autorun not working for me.WHY?????????
fahmad3 says: Jan 12, 2013. 2:47 AM
The problem is windows 7, I tried on win XP and it worked fine, it also works for vista
fahmad3 says: Jan 12, 2013. 2:05 AM
The icons are fine but this isnt working, please help
fahmad3 says: Jan 12, 2013. 2:04 AM
This isnt working
I created an autorun like this:
[autorun]
label=gta_san
icon=icon.ico
shell\lost\command=Autorun.exe
shell\lost=Install
fahmad3 says: Jan 11, 2013. 10:38 PM
Thanks, this information was very helpful,

Can you make an instructable on "How to Create Log Files"
I'll be very thankful my email is: carljhonson623@gmail.com
Thanks
achhabra1 says: Oct 30, 2012. 9:32 AM
how to make autorun of devicon.fil and devlogo.fil files?????
parth_1313 says: May 20, 2012. 12:55 AM
Hello I m new out here .
Can v make 2 autorun files in a single pendrive
CrushBot 2000 says: Dec 4, 2011. 5:51 PM
my auto run:

[autorun]
open=beaboss.exe
action=Be a boss!
icon=HD Box2.ico
label=MurphDrive

Wy won't it run?
jverhaaf in reply to CrushBot 2000Mar 23, 2012. 3:29 AM
action=Be a boss!

You are not allowed to use strange characters in this small batch script.
Thats why it dont works.
CrushBot 2000 in reply to jverhaafApr 20, 2012. 8:23 PM
thanks
pfouquet says: Jul 26, 2011. 1:34 AM
Here is my auto run,
[Autorun]
Icon=usb.ico
Open=Portable Apps\StartPortableApps.exe
Action=Start PortableApps
Label=PierreFouquet

although i cannot open the program with it,
my usb is on my F: drive, and the dir of the files is correct, i have made sure, whats wrong?
jverhaaf in reply to pfouquetMar 23, 2012. 3:26 AM
Simple to explain,

An autrun file has been created for optical drives like cd-roms and dvd-roms. These days these files are still used to install applications from optical drives and are autrun files on flash drives used only to show manufactorers icons.
pfouquet in reply to pfouquetJul 26, 2011. 4:11 AM
the problem is windows 7, they took the (they being MS) fuctionality out, for security reasons, i am running it currently, so if you have Win7 you can use autorun, Vista n XP still can
Berkin says: Feb 27, 2010. 6:34 PM
I made a program in Visual C# that makes these files for me.. :D
sescott in reply to BerkinNov 12, 2011. 5:32 AM
can you send me instrunctions or an installer for that program or something, i dont get any of the autorun stuff, so it would help so much, email me at: sme272@hotmail.com
jwish13796 says: May 9, 2011. 1:51 AM
my autorun wont let me open files
pfouquet in reply to jwish13796Jul 26, 2011. 4:10 AM
the problem is possibly windows 7, they took the (they being MS) fuctionality out, for security reasons
jmarri in reply to jwish13796Jun 26, 2011. 2:26 PM
Mine won't either. :/ ???
pfouquet in reply to jmarriJul 26, 2011. 4:10 AM
the problem is possibly windows 7, they took the (they being MS) fuctionality out, for security reasons
______ in reply to jmarriJul 24, 2011. 2:21 PM
The problem is once you have made the autorun.inf file, pull your drive (like a flash drive) out of the computer and stick it back in.
pfouquet in reply to ______Jul 26, 2011. 4:10 AM
the problem is possibly windows 7, they took the (they being MS) fuctionality out, for security reasons
______ in reply to pfouquetAug 15, 2011. 7:20 AM
Not on mine they didnt, so maybe it is your computer, they took it out on.
bbonnema says: Jun 16, 2011. 6:12 AM
I can't seem to get this function to work. Does anyone know where these files are supposed to be placed?.
einstein6 says: Mar 24, 2011. 4:12 AM
Hi bro, I started to play wif autorun.inf file few years back to give my pendrive some cool icons.. Btw I wanna correct something.. You CAN put multiple words for your icon, eg:- Cool Icon.ico, BUT WITH CONDITION, it is enclosed in double quotes as shown ==> "Cool Icon.ico".. The double quotes read the whole sentence as one..
jbouffard in reply to einstein6May 21, 2011. 6:45 AM
actually, you can put a space and it will work without quotes.
jbouffard says: May 21, 2011. 6:44 AM
how do i put more than one open=open.exe in the autorun file?
willman10000 says: Feb 10, 2010. 7:12 PM
i signed up just to add a comment
you saved me from having to search hours on end :)
no probably just 10 - 20 min of search, but still you saved me time
thanks.
L00t in reply to willman10000Aug 29, 2010. 12:12 PM
I sign up for sites all the time just to comment. ;) I thought I was the only one.
bliu1 in reply to L00tMay 5, 2011. 6:07 PM
lol i just use the facebook reply thingy..much easier
pokeroz says: Dec 27, 2010. 2:53 AM
was wodering if u knew how to make auto run open a .exe on the usb and by the way great interstruable
furrysalamander in reply to pokerozApr 12, 2011. 4:25 PM
fix your grammar, "wodering, interstruable" really? I'm thirteen and I have better grammar than you, sad.
Randomguy65 in reply to furrysalamanderMay 1, 2011. 2:30 PM
No need to be a ___ about it. He is probably from another country.
furrysalamander in reply to Randomguy65May 1, 2011. 4:08 PM
I guess you are right, well at least I hope that. I shouldn't have been so harsh.
mattleonow in reply to furrysalamanderApr 19, 2011. 6:34 PM
spelling. fix your spelling. *facepalm..... silly thirteen year old
furrysalamander in reply to mattleonowApr 24, 2011. 1:57 PM
Ba, too true. As unfortunate as that is. I wonder how he even gets on here with spelling like that.
jgeekw in reply to furrysalamanderMar 22, 2012. 6:16 AM
While you are on a grammar kick, furry, you should really combine your first two "sentences" into one parenthetical idea. Observe:

"Ba, too true. As unfortunate as that is." now becomes: Ba, too true (as unfortunate as that is).

As your comment stands, the second sentence: "As unfortunate as that is.", is a fragment.

Have a nice day.
furrysalamander in reply to jgeekwMar 22, 2012. 8:36 AM
Besides, this was almost a year ago.
furrysalamander in reply to jgeekwMar 22, 2012. 8:35 AM
I shouldn't have said some of the stuff I previously said and I am now almost fourteen and can see what a stupid seventh grader I was being at the time. I now am much smarter and I tend to be nicer too.
tparker-2 says: Apr 6, 2011. 8:16 PM
I HAVE A QUESTION!!!

when i plug in my drive it opens the drive contents automatically
it does not show the window like in the first picture PLEASE HELP
jvpernis says: Aug 15, 2010. 6:01 AM
can you remove a "shell" with notepad to remove e.g. format? (this is, so you can't erase the data of the USB if you have a program on it and no back-up or something) nice instructable anyway
1-40 of 66Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!