Cat Forum banner

1 - 1 of 1 Posts

·
Registered
Joined
·
218 Posts
Discussion Starter #1
For Windows users:

So you are preparing a CD with data files, and would like one of the files, such as a web page, MP3 song or Word document to launch automatically when the CD is inserted. There is only one problem: The 'autorun.inf' doesn't like to launch non-executables and you get a "drive access denied" error when you double-click your CD from My Computer.

Now what? Well.. first, if you used a CD-R, DVD+R or DVD-R, you just earned yourself another coaster or bookmarker. If you used RW media, you need to erase the disc and try again with a different approach.

Here is how:

Since Autorun.inf doesn't work well with non-executables, we are going to make it launch an executable file type, a command-line batch file, and then have the batch file launch our data file.

1. Start Notepad and type the following two lines on a blank document. If you already have an Autorun.inf file, then edit it so that you have these lines.

[autorun]
open=launch.bat

2. Save your file.
3. If you created the file on a blank document you will have to name the file. On the SaveAs dialog, type "autorun.inf" Note: The quotations ARE required, otherwise Notepad will save the file as Autorun.inf.txt.
4. From the Notepad File menu select New to get another blank document.
5. Here is where you are going to launch your document. Type this single line:

@start <path to data file you want autorun>

Examples

The following line launches a web page named Hello.htm from the root of the CD:
@start Hello.htm

The following line launches a WAV file named Welcome to My Disc.wav from a folder on the CD named Audio:
@start "Audio\Welcome to My Disc.wav"

Note that quotations are required when you use long file names.

6. Save the file. In the SaveAs dialog, name the file "launch.bat". Again, the quotations ARE required so that Notepad doesn't save the file as "launch.bat.txt".
7. When burning your disc, put your Autorun.inf and Launch.bat in the root of the disc file system.
8. Fill out the disc file system with all the files you need on the CD or DVD, and don't forget to put the file you want launched automatically in the path you specified when you created the Launch.bat file in Step 5.
9. Burn the disc.

If everything went OK, when you put the disc into the CD drive, you will see a DOS window flashing on the screen followed by your data file opened with its default associated program.

Technical details

The START command used in our Launch.bat file, ensures the data file opens with its default application. This means an HTML file can be launched through FireFox instead of Internet Explorer, or an MP3 file played with Winamp instead of Windows Media Player, assuming the user who gets your disc have such non-Microsoft programs as default for these file types.
 
1 - 1 of 1 Posts
Top