Google Answers Logo
View Question
 
Q: Writing an "Autorun" ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Writing an "Autorun"
Category: Computers > Programming
Asked by: philbert-ga
List Price: $2.00
Posted: 01 Aug 2003 07:46 PDT
Expires: 31 Aug 2003 07:46 PDT
Question ID: 237750
Hi. I would like to write an autorun.inf file that will open an mpg
file when the cd is inserted into the drive. There will only be three
files on the cd, a filename.mpg, a filename.mov and the autorun.inf.
So far I have copied and edited another autorun.inf file to the
following:
[AutoRun]
OPEN=filename.mpg
label=filename
I have written the three files to a cd and the autorun isnt working.
What am I doing wrong? Any help on this is greatly appreciated.
Thank you.
Answer  
Subject: Re: Writing an "Autorun"
Answered By: answerguru-ga on 01 Aug 2003 08:29 PDT
Rated:5 out of 5 stars
 
Hello philbert-ga,

It appears that your problem is with the 'OPEN=' statement. This
statement will only work with executable programs on your CD (*.exe).
If you are trying to open a data file (in this case a video) with the
default program on the user's computer, you need to use the
ShellExecute command as follows:

[autorun]
ShellExecute=filename.mpg
icon=filename.mpg

However, there is a slight caveat; the ShellExecute command does not
work on all versions of Windows, so you can also use this equivalent
command:

[autorun]
open=command /c start filename.mpg
icon=filename.mpg

http://www.cryer.co.uk/brian/windows/howtocacdtwar.htm

There is also a way to test your autorun.inf file without burning a CD
- the details are available at:
http://www.cryer.co.uk/brian/windows/howtotcdaurwobacd.htm

Hopefully this helps you in your quest...happy autorunning!

answerguru-ga
Google Answers Researcher
philbert-ga rated this answer:5 out of 5 stars
Excellent. Thanks for your help.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy