How to make an autorun CD
Jul 6th, 2008 by dipankar
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.
There are should be three main section in the autorun.inf file.
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.
To create an autorun.inf file, type in notepad:
[autorun]
open=setup.exe
icon= icon.ico
In the above paragraph where open is located if your CD has an executable file which you would like to run automatically you would need to type it into this line. Next is the icon statement, if you would like your own icon for the CD place the name of the icon file into this path. you can remove the icon= icon.ico line, if you don’t need to use any icon for the CD.
Save the file as autorun.inf and exit.
Note: The autorun.inf file has limited abilities, such as the inability of executing non-executable files. Often many users will want to create an autorun.inf file that executes an HTML file. However, entering something such as “open=index.html” causes an error.
To open a non-executable file, say a html file named index.html:
first create a batch file say, autorun.bat in notepad, by typing
@echo Loading CD
@start index.html
@cls
@exit
Then in the autorun.inf file put the lines
[autorun]
open=autorun.bat
Now your CD can load your desired html file.