The Autorun.inf File

The Autorun.inf file is a text file located in the root directory of the CD. This file specifies the startup application associated with the CD, as well as the icon that is displayed in Windows Explorer or after you have double-clicked My Computer. You can also specify customized menu items for the CD in Autorun.inf. These menu items are added to the shortcut menu that is displayed when the user selects the CD-ROM icon and right-clicks the mouse.

The smallest Autorun.inf file contains three lines of text and identifies the startup application and the icon for the CD-ROM:

[autorun]

open=filename.exe

icon=filename.ico

The [autorun] line identifies the block of lines that follow it as AutoPlay commands. This line is required in every Autorun.inf file. The open=filename.exe line specifies the path and file name of the application that AutoPlay runs when you insert the CD into the appropriate drive. The icon=filename.ico line specifies an icon to represent the AutoPlay-enabled CD in the Windows 95 user interface.