Wednesday, May 30, 2007

What is inside Autorun.inf?

What is inside Autorun.inf?

Autorun.inf is a text file and in its basic form it look like this:[AutoRun]OPEN=MYAPP.EXEThe OPEN command specifies which program that should be run when the CD/DVD is inserted in the drive. In the example above a program with the name MYAPP.EXE will be executed.

Autorun.inf can also specify an icon that will represent your application's CD or DVD in the Windows user interface (for example in Windows Explorer). To specify a new icon to the CD/DVD drive, Autorun.inf should contain the following commands:

[AutoRun]OPEN=MYAPP.EXEICON=MYICON.ICO

The ICON command specifies the filename of the new icon to display. In this case an icon with the filename MYICON.ICO will be used.In the examples above the program file and the icon file most be located in the root directory of the CD/DVD, but you can also access files located in a sub directory on the CD/DVD if you specify a relative path.

Example:[AutoRun]OPEN=FOLDER\MYAPP.EXE

The OPEN and ICON commands are the most used in Autorun.inf files, but there are more commands available. You can for example specify a new disc label with the LABEL command. The LABEL command has the benefit that you can specify labels that contains more than 16 characters (16 is the normal limit for CD/DVD labels).

A list and a description of the commands that can be used in Autorun.inf can be found at the following page: Autorun.inf - Commands.

If you want a more detailed information about the commands you can also take a look at the following Microsoft page: Autorun.inf Entries.

No comments: