How to Launch a CD Automatically

The "autorun" feature of Windows 95 and later allows a program to be executed right after the disc is inserted. For this to work, the system must have autorun enabled, and Auto Insert Notification ("AIN") must also be on for the CD-ROM drive.

When preparing a CD for Windows, put a text file called "autorun.inf" in the root directory that contains something like this:


The CD-ROM will be shown in the "My Computer" window with the specified icon. If the disc is inserted on a system with AIN and autorun enabled, the program named will be launched.

A more complicated example :

open = setup.exe /i
icon = setup.exe, 1
shell\configure = &Configure...
shell\configure\command = setup.exe /c
shell\install = &Install...
shell\install\command = setup.exe /i
shell\readme = &Read Me
shell\readme\command = notepad help\readme.txt
shell\help = &Help
shell\help\command = winhlp32help\helpfile.hlp

Explanation of the example is as follow:

The default AutoPlay command will be "setup /i".
The icon for the CD will be icon #1 in setup.exe.

Four commands will be added to the right-click pop-up menu:

'Configure...', which will run "setup /c"
'Install...', which will run "setup /i" (same as auto-run in this case)
'Read Me', which launches notepad.exe to display "help\readme.txt"
'Help', which displays the file "help\helpfile.hlp" with the Win95 help facility.

You should also be able to open a web page with the end-user's default browser by using the "start" command, e.g.: [autorun] open=start index.htm.

  iSchoolMedia logo (2K)For any comments concerning this page, e-mail to info@ischoolmedia.com.

The material in this document is for information only and is subject to change without prior notice. Whilst reasonable efforts have been made in the preparation of this document to assure its accuracy, iSCHOOL NEW MEDIA LIMITED assumes no liability resulting from the use of the information contained herein. Company names and products are property of their respective owners.