Subscribe For Free Updates!

We'll not spam mate! We promise.

Jun 10, 2008

How to Autorun work ?

Autorun.inf, What is it?

Autorun.inf is the primary instruction file associated with the Autorun function. Autorun.inf itself is a simple text-based configuration file that tells the operating system which executable to start, which icon to use, and which additional menu commands to make available. In other words, autorun.inf tells Windows how to deal open the presentation and treat the contents of the CD.

The entire sequence is initiated when the "disk change notifcation" polling discovers a new disk in the CD or DVD ROM drive. Then, if the "Auto insert notification" feature is enabled (it is by default), Windows checks in the new disk's root directory for the existence of an "autorun.inf" file. If found, Windows then reads and follows the specific instructions this file defines. If no autorun.inf file is found, then Windows refers to the new disk by its serial number and executes the default actions associated with the (data or audio) content on the disk.

The Autorun.inf file defines the following:
Autorun.inf Defines the following: The process or application that will automatically run when a disk is inserted
Automatically run when CD is inserted Optionally, one can define the process or application that will run for specific Operating environments.
Icon Representing CD or DVD The icon that will represent your application's CD or DVD when the drive is viewed with My Computer or Explorer.
Menu Commands when CD-ROM is clicked Menu commands displayed when the user right-clicks the CD-ROM icon from My Computer or Explorer.

Read more after jump

A simple Autorun.inf example:

A complex Autorun.inf example:
This example is used in the following section for complete definition and descriptions.
open=filename.exe /argument1
shell\install = &Install
shell\install\command = setup.exe
shell\uninstall = &UnInstall
shell\uninstall\command = Uninstall.exe
shell\readme = &Read Me
shell\readme\command = notepad readme.txt
shell\help = &Help
shell\help\command = helpfilename.hlp
This section describes the configuration of the Autorun.inf file and each of the potential items.

Example Autorun File: Description:
[autorun] [autorun] is the primary, required section name.
open=filename.exe /argument1

Open is the keyword to determine what action to take upon insert notification.
filename.exe is the value defining the application that will be automatically started.
/argument1 is the argument, parameter or switch passed to the application being run. Logically, any command line parameters used must be supported by the application.

Icon is the keyword to determine the icon used for the disk.
filename.dll is the value defining the file containing the icon.
,5 is the argument to the icon resource defining which icon to display.

Note: By default, the system looks for the file in the root directory of the inserted disk. If you want to access a file located in a specific folder or subdirectory, specify a path relative to the root.

Example: open = foldername\filename.exe This will not change the current directory.

Although AutoPlay is the default menu item, you can define a different command to be the default by including the following line. shell = verb

When the user double-clicks on the icon, the command associated with this entry will be carried out.

Note: a more common method of defining the icon resouce is an explicit reference to a .ico file. Example: icon=autorun.ico

Note: The icon defined representing your application's CD or DVD is the drive icon as viewed with My Computer or Explorer. Valid file types containing icons include .ICO .BMP .EXE .DLL If the file includes more than one icon, by default, the second icon in the files icon resource will be displayed.

Example Autorun File: Description:
[autorun.mips] Defining the autorun items for a mips machine
open=filenam2.exe The platform specific application to run
icon=filename2.ico The platform specific autorun icon
[autorun.alpha] Defining the autorun items for a DEC Alphamachine
open=filenam3.exe The platform specific application to run
icon=filename3.ico The platform specific autorun icon
[autorun.ppc] Defining the autorun items for a Power PC
open=filenam4.exe The platform specific application to run
icon=filename4.ico The platform specific autorun icon
shell\install = &Install The Keyword defining a menu item and the Hot key for that item
shell\install\command = setup.exe The keyword defining the operation to perform when the user selects this item
shell\uninstall = &UnInstall Additional menu item example
shell\uninstall\command = Uninstall.exe Additional menu item example
shell\readme = &Read Me Additional menu item example
shell\readme\command = notepad readme.txt Additional menu item example
shell\help = &Help Additional menu item example
shell\help\command = helpfilename.hlp Additional menu item exampl

How to Test Autorun.inf Without Burning to a CD

It is possible to test an Autorun.inf file without burning all the necessary files onto CD-ROM, as long as the computer has autorun enabled on at least one of its removeable devices. More information on such procedures to enable autorun can be found here.

By utilizing the following methods, constant refining of the Autorun.inf file is possible without the need to burn multiple CDs.

Using removable media (Floppy/Zip/etc...)

1. Enable autorun on the desired media drive.

2. Copy the autorun.inf and all dependant files onto the removable media.

3. Remove and insert the media.

Using a Virtual Drive

1. Download and install a virtual CD/DVD-ROM emulator, such as the tool available from Daemon-Tools.

2. Using CD-Burning software, such as provided by Nero or Roxio, create a CD project with the Autorun.inf file inserted into the root directory of the CD.

3. Save the project to a CD project file, usually with a .bin or .iso or .cdi extension, with the CD-Burning software.

4. Using the CD/DVD-ROM emulator, load the project file into the virtual drive. This has the same effect as physically inserting the CD with the Autorun.inf into the CD/DVD-ROM.

How To Enable/Disable Autorun (Windows 95/98/Me)

1. Access the System Properties Dialog. Using Control Panel: My Computer: Properties or Explorer: My Computer: Properties.

2. Select the Device Manager tab.

3. Select the CD-ROM folder.

4. Select the entry for your CD-ROM drive.

5. Select Properties.

6. Select the Settings tab.

7. Turn on or off the Auto insert notification option.

8. Select OK.

9. Select OK

How To Enable/Disable Autorun (Windows NT/2000)

1. Start RegEdit (regedt32.exe).

2. Go to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/Cdrom.

3. Edit the Autorun value to '1' to enable autorn, and '0' to disable autorun.

4. Close RegEdit

How To Enable/Disable Autorun (Windows XP)

1. Open Windows Explorer by pressing the Windows + "e" key.

2. Right-click the desired CD-ROM and select Properties from the menu.

3. Select the AutoPlay tab.

4. Select each item from the pulldown list and for the Action to perform, select "Take no action" to disable autorun, or pick the apporpriate action to take if enabling autorun.

5. Select OK.

How To Enable Autorun for Other Removable Media

Autorun can be enabled or disabled for all Removable media types, such as a floppy or Zip disk. Windows systems are configured to enable CD Notification, other removable media are by default disabled.

The System Properties User interface only exposes the CD Enable or Disable selection. The setting reflected in this dialog makes an entry in the System Registry. It is in this same location that other media types are configured.


1. Modifiying the Registry is not for the inexperienced user. Anyone will tell you, be VERY careful.
2. The modifications made in this case use Hex not Decimal numbers. If you are unfamiliar with the Registry or the characteristics of base numbering and Hex, studying these topics prior to making these modifications is advisable.

To Modify these Registry Settings, Use Regedit and navigate to the following Key:


The default value for the setting is 95 0 0 0. Change the first byte to 91. Restart the computer to make the new setting take effect. You may have to right-click on the floppy and choose AutoPlay from the menu to see the AutoPlay behavior.
Additional Technical Info

The first byte defines which drive types to EXCLUDE from Autorun behavior. The hex value of the byte is the sum of all of the drive type values to exclude + 128.

DRIVE_REMOVABLE 4 (floppy disks and removable cartridges)
DRIVE_FIXED 8 (hard disks)
DRIVE_REMOTE 16 (network drives)

The default configuration excludes UNKNOWN (1), REMOVABLE (4) and REMOTE (16) which would be 16 + 4 + 1 + 128 = 149, which is hex 95. If you take out REMOVABLE you get 16 + 1 + 128 = 145, which is hex 91.

The calculation for this value is 1 + 4 + 16 + 128 = 149. 149 Decimal is 95 Hex

The new calculation is 1 + 16 + 128 = 145. 149 Decimal is 91 Hex

You may have to restart for the system to recognize a floppy or Zip as an Autoplay drive. If your floppy drive does not show a custom icon or AutoPlay in the menu when right-clicked, double-click on the icon for your computer on the desktop and press F5 to refresh the information in the Explorer window. Zips and floppies will not autolaunch when media is inserted. You must double-click their icon or right-click and choose AutoPlay from the menu.

Socializer Widget

14 Comment:

mr.cappuccino said...

saya sering jumpai autorun dideteksi sbg virus? bagaimana itu mas bud?

tjahaju said...

mana poto adek kecil nya?

Fatih said...

nice blog. btw, klo bisa link afsyuhud.blogspot diganti ke trims ya :)

suzie said...

Hi, very useful tutorial. I was wondering. If i wanna have a dvd menu that has "links" to three full sized movies, what do i do? Put autorun beside the video_ts and audio_ts folders with the menu information? I'm really not sure. Will this autorun business work in my livingroom dvd player? PLEASE ANY HELP WORKS!

4ALL2ALL said...

Merry Christmas & Happy New Year from Vietnam.

forALLtoALL's Community

Anonymous said...

Nice post.

I have some good information about how to make an easy professional web site, a guide to make your own line ads web site (with the simple approach), and much more.
just click here
Trust me.

Anonymous said...

Hello there my friend! I found your blog very interesting so I have added your link in my Blogroll. I hope you'll link me back. Have a nice day!

Carlos said...

Hi! Care to x-link? I have added you already in my list. Have a nice day!

Anonymous said...

Submit your Blog to our Newest PR 3 Web Directory for Bloggers. Visit

Anonymous said...

Happy Wednesday! Bloghoppin' here... Hey, I have an interesting tutorial for you that I have written myself. It is about adding Adsense on your Single Post in XML template. I hope you'll like it! God Bless you!

zetta172 said...

belajar dari sini

Investpanas said...

lam kenal this blog and content very nice

Learn Japanese Online said...

Nice blog! Keep blogging, I like your posting.

Best Poker Listing said...

You have post good information.