How to make an autorun CD, autoplay CD with Autorun.inf file

Useful autorun CD menu tools:

AutoRun Pro
Longtion AutoRun CD Menu Software - Create autorun CD menu for CD, DVD and USB stick.

AutoRun Pro

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.

A simple Autorun.inf example:

How to make an Autorun CD

Autorun is a feature of the Microsoft Windows operating system. The Autorun feature detects when a CD is inserted into the CD-ROM drive and runs an application based on the contents of the Autorun.inf file located on the CD.

Autorun is enabled by the new 32-bit, protected-mode driver architecture in Microsoft Windows. Because the operating system can now detect the insertion of media in a CD-ROM drive, it has the opportunity to do some intelligent processing whenever this occurs.

When a CD is inserted into the CD-ROM drive, the operating system checks for a file named Autorun.inf in the root directory of the CD. This file contains a pointer to an executable file.

To create an Autorun-enabled CD-ROM, proceed as follows:

    Create an Autorun.inf File Autorun.inf is a text file that is located in the root folder of your application CD-ROM. It provides to the computer the name and the location of the startup program for your application that is installed when the CD-ROM is inserted. The Autorun.inf file can also contain optional information including the following:
    The name of a file that contains an icon that represents your application's CD-ROM drive. This icon appears in Windows Explorer instead of the standard drive icon.
    Additional commands for the shortcut menu that appears when the user right-clicks the CD-ROM icon. You can also specify the default command that runs when the user double-clicks the icon. Autorun.inf files are similar to .ini files.
    The [autorun] section contains the default Autorun commands. All Autorun.inf files must have an [autorun] section.
    icon: Specifies the path and the file name of an application-specific icon for the CD-ROM drive.
    open: Specifies the path and the file name of the startup application.


The following is an example of a simple Autorun.inf file. It specifies Filename.exe as the startup application. The second icon represents the CD-ROM drive instead of the standard drive icon.

How to Configure Windows 7 AutoPlay from the Control Panel

There is an individual AutoPlay enable / disable setting for every type of Windows 7 media or device.  Here is where you configure the default settings for each media.

Click on the Start 'Orb', Control Panel, Hardware and Sound, AutoPlay.

Configure Windows 7 AutoPlay

Configure Windows 7 AutoPlay

It is worth scrolling down the list in your Control Panel just to see the sheer scale of the media that you can enable or disable for AutoPlay.  There are at least 4 options for each type of media.  When you have finished you can either save, or else reset the defaults.

Note: The Windows 7 AutoPlay setting is in the Hardware and Sound folder, this is a slightly different location from XP.

Windows 7 default menu: