3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

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
«
  • autorun basic 1.bmp
  • autorun basic 2.bmp
  • autorun basic saved.bmp
  • files saved 1.bmp
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 »
60 comments
1-40 of 60next »
May 20, 2012. 12:55 AMparth_1313 says:
Hello I m new out here .
Can v make 2 autorun files in a single pendrive
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?
Mar 23, 2012. 3:29 AMjverhaaf says:
action=Be a boss!

You are not allowed to use strange characters in this small batch script.
Thats why it dont works.
Apr 20, 2012. 8:23 PMCrushBot 2000 says:
thanks
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?
Mar 23, 2012. 3:26 AMjverhaaf says:
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.
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
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
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.
Mar 22, 2012. 6:16 AMjgeekw says:
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.
Mar 22, 2012. 8:36 AMfurrysalamander says:
Besides, this was almost a year ago.
Mar 22, 2012. 8:35 AMfurrysalamander says:
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.
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
1-40 of 60next »

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!
41
Followers
6
Author:Crazy Leprecaun