How to make an Autorun.inf File

How to make an Autorun.inf File
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 1A Basic Autorun File

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".
« Previous StepDownload PDFView All StepsNext Step »
53 comments
1-40 of 53next »
Dec 4, 2011. 5:51 PMCrushBot 2000 says:
my auto run:

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

Wy won't it run?
Feb 27, 2010. 6:34 PMBerkin says:
I made a program in Visual C# that makes these files for me.. :D
Nov 12, 2011. 5:32 AMsescott says:
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
Jul 26, 2011. 1:34 AMpfouquet says:
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?
Jul 26, 2011. 4:11 AMpfouquet says:
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
May 9, 2011. 1:51 AMjwish13796 says:
my autorun wont let me open files
Jul 26, 2011. 4:10 AMpfouquet says:
the problem is possibly windows 7, they took the (they being MS) fuctionality out, for security reasons
Jun 26, 2011. 2:26 PMjmarri says:
Mine won't either. :/ ???
Jul 26, 2011. 4:10 AMpfouquet says:
the problem is possibly windows 7, they took the (they being MS) fuctionality out, for security reasons
Jul 24, 2011. 2:21 PM______ says:
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.
Jul 26, 2011. 4:10 AMpfouquet says:
the problem is possibly windows 7, they took the (they being MS) fuctionality out, for security reasons
Aug 15, 2011. 7:20 AM______ says:
Not on mine they didnt, so maybe it is your computer, they took it out on.
Jun 16, 2011. 6:12 AMbbonnema says:
I can't seem to get this function to work. Does anyone know where these files are supposed to be placed?.
Mar 24, 2011. 4:12 AMeinstein6 says:
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..
May 21, 2011. 6:45 AMjbouffard says:
actually, you can put a space and it will work without quotes.
May 21, 2011. 6:44 AMjbouffard says:
how do i put more than one open=open.exe in the autorun file?
Feb 10, 2010. 7:12 PMwillman10000 says:
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.
Aug 29, 2010. 12:12 PML00t says:
I sign up for sites all the time just to comment. ;) I thought I was the only one.
May 5, 2011. 6:07 PMbliu1 says:
lol i just use the facebook reply thingy..much easier
Dec 27, 2010. 2:53 AMpokeroz says:
was wodering if u knew how to make auto run open a .exe on the usb and by the way great interstruable
Apr 12, 2011. 4:25 PMfurrysalamander says:
fix your grammar, "wodering, interstruable" really? I'm thirteen and I have better grammar than you, sad.
May 1, 2011. 2:30 PMRandomguy65 says:
No need to be a ___ about it. He is probably from another country.
May 1, 2011. 4:08 PMfurrysalamander says:
I guess you are right, well at least I hope that. I shouldn't have been so harsh.
Apr 19, 2011. 6:34 PMmattleonow says:
spelling. fix your spelling. *facepalm..... silly thirteen year old
Apr 24, 2011. 1:57 PMfurrysalamander says:
Ba, too true. As unfortunate as that is. I wonder how he even gets on here with spelling like that.
Apr 6, 2011. 8:16 PMtparker-2 says:
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
Aug 15, 2010. 6:01 AMjvpernis says:
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
Oct 2, 2009. 12:02 PMJ-Manoo7 says:
where is the icon file for the default windows folder icon? great ible
Oct 3, 2009. 6:55 AMJ-Manoo7 says:
yea its in the shell32 directory, when you change icon on the desktop i found thats where it looks, put the number 5 in and it acutally change so i just need the number now, problem is itf you search google for "icon=%blablabla%bla\bla\bla\SHELL32, 5" (the icon path) avast! finds a virus on one of the pages before i even navigate to it. (still on the search page) so either i will just have to kep guessing or find a way to let avast! let me use the search.. or ill search something else. either way you're right. ill get back at you and tell you if it works. if it does good i might just post an 'ible
Apr 17, 2009. 3:39 PMemuman4evr says:
I made this on a vista machine and it will not autorun on a xp machine. Have any idea?
Aug 9, 2009. 11:52 AMDNR says:
wat does the autorun file of our drives contain....i want the whole code,mine file is modified...wen i open drives a "open with" dialogue box opens.........can u solve it
Jul 16, 2009. 4:10 PMPCfreak says:
great Ible ive did this on both XP and Vista and didnt have a prob at all, all tho i started seeing viruses on my flash drive so i quit using autorun files but i liked using them tho
May 25, 2009. 3:17 AMerikals says:
Excellent 'ible. Thanks again.
Mar 26, 2009. 3:29 PMRellsun says:
I can't seem to get this to work in vista. Only the name change works. But it does work fine in xp, name, icon, open command all work. Pic of my autorun file included Any suggestions?
Mar 26, 2009. 3:55 PMRellsun says:
ill try that i guess the pic didnt upload. thanks anyway though. I think your right on the way vista accepts autorun because it worked on xp.
Autorun.jpg
Mar 26, 2009. 4:06 PMRellsun says:
Nope still nothing ill try and do a little research. Im gunna use this so i can get the serial keys for windows by itself obviously just weird that it works in xp and in an xp virtual machine.
1-40 of 53next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
40
Followers
6
Author:Crazy Leprecaun