How to Add Autoplay to a CD
Microsoft introduced Autoplay with the introduction of Windows 95. This feature causes a program to execute when you insert a CD into your CD drive. It does this by looking for a file named Autorun.inf on the CD. This file tells Windows the name of the program to run. When you insert a music CD into your computer and Media Player opens, Autoplay causes that to happen. Add Autoplay to a CD by adding an Autorun.inf file to the CD.
Instructions
-
-
1
Open Notepad, and add the following text to a new document:
[autorun]
Open=ProgramToRun.exe
Replace "ProgramToRun.exe" with the path and the file name of the program that you want to run. For example, to make the Windows Media Player program play when a user inserts a CD, use this text:
[autorun]
Open=wmplayer.exe
"Wmplayer.exe" is the name of the Windows Media Player program.
-
2
Add this line below the previous line if you want to use a custom icon for your CD-ROM drive.
icon=IconToShow.ico
Replace "IconToShow.ico" with the path and file name of an icon that you want to appear. Users will see this icon in Windows Explorer instead of the default CD-ROM icon.
-
-
3
Press "Ctrl + S" to open the "Save As" window. Navigate to the folder that contains the files that you will burn to the CD.
-
4
Type "autorun.inf" in the "File Name" text box, and click "Save."
-
1
Tips & Warnings
Microsoft recommends keeping Autorun applications small so that they start soon after a user inserts the CD.
References
Resources
- Photo Credit cd image by Dron from Fotolia.com