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.

How To Use Your TV as a Computer Monitor

1. Identify your TV's input connections. Most TVs these days have three basic types of inputs. You have your coaxial cable input, the same as your cable box or satellite, an RCA composite input (the yellow, red and white inputs) and an S-video connector. Newer televisions might have Component Video, DVI, VGA or HDMI inputs but the ones listed above are more common.

2. Identify your computer's outputs. These days computer manufacturers are adding TV compatible outputs on their products so it's easy to hook it up quickly. The S-video in particular seems to be popping up on more and more computers. Mostly you will find the usual VGA output that the regular monitor hooks up to. The newer multi media computers of the near future will probably have all high definition outputs that connect directly to your TV, but for now we will deal with what most people have for both computers and televisions.

3. Find the appropriate adapter for your connections. You may need to get an adapter so you can hook up your computer to the TV. These have a VGA adapter on one end and (usually) a selection of hookups on the other (S-video, RCA composite and Component). The good thing about these is that you can take it from TV to TV and you'll be able to hook up to all of them. I highly recommend a wireless adapter. It costs a bit more but it's worth not having a big cable mess and not keeping your computer near your TV.

4. Connect your computer to your TV. If you have a TV compatible output on your computer, such as an S-video jack, just take an S-video cable and connect it to your computer and your TV. If you do not, then attach your VGA end of your adapter to your computer and use the RCA, S-video or Component Video cable to attach to your TV. After you've made all the connections, make sure you are on the correct TV video input. Press the input button on your TV or remote until you see your computer's signal.

Now, here is where you might get a little disappointed. Your TV's usual video signal is called NTSC (PAL if you live in Europe). This signal is different than the one generated by your computer. Computers use signals measured by pixels: 320x200, 320x240, 640x480, 800x600, 1024x768, 1280x1024 or 1600x1200. Most TV's can only get about 500 lines of resolution, in computers this is like 500 vertical pixels. The video amplifiers in televisions cannot handle higher resolutions either. So when you factor these things together you are left with a maximum resolution of 640x480.

This is not the worst thing in the world because you can play games and watch video in lower resolutions no problem. It's just that you will never get close to the resolution your computer monitor will give you. Beware of some adapters that claim to give you more than 640x480, they just reduce the quality of the original television signal to compensate.

You can get an adapter for an HDTV that will give you higher resolutions but you need an HDTV and an adapter that costs usually 2-3 times more than your standard adapter. Any way you choose, it is not hard to use your TV as a computer monitor if you follow the few steps above.