What is autorun.inf file?

After a long break now i am back to the job again. Really sorry for not writing for along time. Today I am bringing an interesting post which you may definitely like. So start reading....

The post is about autorun.inf file. Everyone who is using pen drives must have come across this name. I have seen few people who think that it is a virus!! But that is not true. Actually you can say that autorun is a technique introduced by Microsoft which is used to launch some application automatically whenever pendrive or cd/dvd is inserted in PC. You can also use(enjoy) this techniques by just knowing somw basic commands of autorun.

Here i have given a list & uses of some basic autorun command entries. And then i've given some examples how to use this commands. For more detail information you may visit http://msdn.microsoft.com/en-us/library/aa969327.aspx .

Basic autorun commands:


The OPEN command specifies the path and file name of the application that AutoRun launches when a user inserts a disc in the drive. You can also specify parameters/arguments to the application.


The ICON command specifies an icon which represents the AutoRun-enabled drive in the Windows user interface. The icon is normally an .ico file, but can also be a .bmp, .exe or .dll file containing icon information. The icon file must be in the same directory as the file specified by the OPEN command.


The LABEL command specifies a text label which represents the AutoRun-enabled drive in the Windows user interface. This text label is for example in Windows Explorer showed to the right or below the drive icon.


The SHELLEXECUTE command opens a document or starts an application. Mostly used to open documents automatically. Requires Windows ME/2000 or newer.


The SHELL command specifies a default command for the drive's shortcut menu. The shortcut menu of the drive is the menu that is opened when the user right clicks on the drive icon.


The SHELL\VERB command adds a custom command to the drive's shortcut menu. This custom command can for example be used to launch an application on the CD/DVD.


ACTION is a command that was introduced with Windows XP SP2. It is not supported in Windows before that. This command specifies a text that should be shown as the first option in the Windows Autoplay dialog, together with the icon specified by the ICON. This option is always selected by default and if the user accepts the option, the application specified by the OPEN or SHELLEXECUTE entry in the media's Autorun.inf file is launched. As an alternative, the SHELLEXECUTE command can also specify a document instead of an application.
How to use:

You can change icon of your pendrive using autorun.inf.

for that follow the steps:
1.First of all copy the icon file (having extension .ico) into your pendrive's root directory suppose the file name is icon.ico.
2.Now open notepad write following lines .


(note: write the name of the icon file instead of icon.ico. Your icon file must be in the root directory of your pendrive or cd.)
3. Now save file with the name autorun.inf in to root directory of your pendrive .

It may be posible that you won't be allowed to save this file directly in root directory. In this situation save this file in any other directory. Then copy the file & paste inside pendrives root directory. You will be asked that "autorun.inf already exist. would you like to overwrite?" then click the "yes" button. That's it!

Now remove pendrive & reinsert pendrive. You will see that icon of the pendrive will be changed!

You can run any application using open command.

For that add following line to the autorun.inf file.


Note: insted of application.exe write the name of the application you want to run. This application must be inside the pendrive.

Try different command in the same way.

Don't forget to leave comment:).

You may also like

Popular Posts