![]() Number 232 - August 2002 |
|
| CD Burning Q&A | |
|
This and the next seven answers compiled by Charles W. Evans, Reviews Editor HAL-PC Magazine Q&A on How To were written in response to CD burning articles published in HAL-PC magazine recently. The author of each answer is noted at the end of the answer. | |
| Creating the Autorun.INF File | |
| Question Answered by Ed Hardin1 HAL-PC | |
|
Q. How Do I Get My CD TO Automatically Start, Like The Commercial CDs?
A. There may be times when you would like to automatically start a program on your CD when it is inserted. Making a CD AutoRun-enabled is very simple. You must include a text file called autorun.inf in the root directory of the CD. Creating the Autorun.INF file You should use Windows Notepad or some other text-only editor to create the autorun.inf file. The very first line of the autorun.inf file should be: [autorun] by itself with no leading spaces. Following that line you can enter several possible commands. The most important is "open" which specifies the path and name of the program that you want to start when the CD is inserted into the drive. For example, let's say you are creating a CD of MP3 music files and want to start the Winamp MP3 player automatically. To find out the name of the Winamp program file that you need to run and where it is located: click the Windows Start button, click on Programs, go to the Winamp folder, and then open=C:\Program Files\Winamp\Winamp.exe |
There are no spaces
surrounding the equal sign. If the program that you wanted to start
automatically will be on the CD itself, then you would not need the full
path but only the file name such as:
open=Winamp.exe That's all there is to it. When you burn your CD, just place this autorun.inf file in the root directory and, if you want, the program file that it is to start. Keep in mind, that if you reference a program file that remains on your hard drive instead of a program that is placed directly on the CD, it may not "autorun" on other computers. Why? Because the application program (in this example, Winamp.exe) most likely will NOT be located in the same folder as is your copy. If you use Notepad to open the autorun.inf file on a commercial CD, you will probably see something like "open=setup.exe" or "open=install.exe". This would be the program that starts the program's install process automatically when you insert the CD into the drive. To read about the other possible commands and for more detailed information go to www.Msdn. micro soft.com/ library /default. asp?url=/ library /enus/ shellc/ platform/ Shell/ Shell-basics/ Autoplay-cmds.asp or just search the web or Microsoft for the key word "autorun". 1 Ed Hardin is a HAL-PC member who is president of Hardin-Soft, Inc. at www.hardin-soft.com or e-mail at ehardin@hardin-soft.com. |
Number 232 - August 2002
|
|