Autorun.inf

The Autorun.inf file is a text file located in the root directory of the CD on which your DirectX® application is shipped. This file contains the name of the startup program on the disc. This startup program runs automatically when the disc is inserted in the CD-ROM drive. The Autorun.inf file also contains the file name of the icon that you want to represent your application's CD in the Windows user interface. In addition, the Autorun.inf file can contain optional menu commands that you want added to the shortcut menu. These menu commands are displayed when the user right-clicks the CD-ROM icon.

The following is an example of a minimal Autorun.inf file.

[autorun] 
open=filename.exe 
icon=filename.ico 
 

The [autorun] section identifies the lines that follow it as AutoPlay commands. An [autorun] section is required in every Autorun.inf file. The open command specifies the path and file name of the startup application. The icon command specifies the file name that contains the icon.

The Autorun.inf file also can contain architecture-specific sections for Windows NT 4.0 running on RISC processors. For each type of processor architecture, add a section to the Autorun.inf file that contains the file name of the startup application you want to run for that architecture. The following table lists the commands used for the architectures that AutoPlay supports.

Architecture Section Title
368 or higher [autorun]
MIPS [autorun.mips]
DEC Alpha [autorun.alpha]
PowerPC [autorun.ppc]

The following example shows how to create an Autorun.inf file that runs different startup applications depending on the computer architecture:

[autorun] 
open=filename.exe 
icon=filename.ico 
 
[autorun.mips] 
open=filenam2.exe 
icon=filename.ico 
 
[autorun.alpha] 
open=filenam3.exe 
icon=filename.ico 
 
[autorun.ppc] 
open=filenam4.exe 
icon=filename.ico 
 

The shell checks for an architecture-specific section first. If it does not find one, it uses the information in the [autorun] section. After the shell finds a section, it ignores all the other sections, so each section must contain all the information for that architecture.