How to autorun a document instead of a program from a CD/DVD - Cat Forum : Cat Discussion Forums
 
LinkBack Thread Tools
post #1 of 1 (permalink) Old 01-13-2005, 10:31 AM Thread Starter
Cat
 
Join Date: Oct 2004
Location: Puerto Rico
Posts: 226
How to autorun a document instead of a program from a CD/DVD

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.

Roberto (Vequi's Daddy)
Vequi says "íMiau!"
Vequi's Daddy is offline  
Sponsored Links
Advertisement
 
Reply

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the Cat Forum : Cat Discussion Forums forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page



Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome