Autorun.inf - what does this file do ? This page last modified 18th March 2000

How to make a disk that will have an icon when viewed and automatically run a program when the disk is inserted. It is also possible to add extra items to the menu displayed when a drive is right-clicked.

sample my computer

This is controlled by the contents of a file called autorun.inf in the root directory of the CDROM or hard disk drive. The autorun.inf file is a text file in the windows registry (old .INI file) form of sections with variables set to values within each section.


[autorun]
ICON=\AUTORUN\cabinet.ICO
OPEN=\setup.exe
You can add items to the right click menu for that drive by adding pairs of lines like:

shell\mylabel=This is the menu item text.
shell\mylabel\command=myprogram.exe

Which would add a Menu Item that would run the program "myprogram.exe"


I normally put a directory called autorun containing any icons or other support files needed. If there is no open= program specified the windows explorer will open when the disk is inserted. The ICON= can also point to a program and there is some way of specifying which icon from the executable should be used.

New WINSTART.EXE - get rid of the command prompt window flash.

A useful tip if you really just want to open a documents is to specify it like:

open=start mydocument.ext

That will cause windows to run a DOS prompt to start the document, and use the appropriate program from the list of registered file types.

Excellent page all about autorun files information by Mark Trescowthick - GUI Computing


If the icons don't appear the probable cause is the windows registry entry that controls this feature. Setting it to all 00's enables autorun on everything, Setting to 95 only on removables (not floppies). Interestingly the icon argument takes effect even if the OPEN one doesnt.

A file contain the following text and renamed with a .reg extension will clear the entries. Or run REGEXIT.EXE and search for the NoDriveTypeAutoRun

!!! backup your windows system.dat and user.dat before you fiddle with them !!!

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=hex:00,00,00,00


I just made this stuff up as I went along so of course what you may do with it is nothing to do with me.


This page has been accessed times. Last manually reset 23-11-2001.


I can't believe the number of hits this page has had, so if you want to comment please drop me a line.

Email to Jeff Turner at jetsoft

Jetsoft home page