Re: autorun

Posted by webmaster Guido on April 01, 2003

In Reply to: autorun posted by angie on March 31, 2003

: I'm trying to save my website to a cd, and I want it to autoplay when it is inserted into a machine. I know how to make an executable file autoplay, is there any way to have a .html file run automatically. Would appreciate any help.

No, you can only do this with executable files, not with any datafile. So you need a program that is started after the insertion of the CD, and that program has to open the index file.

In the root directory of the CD, put a file with the name autorun.inf with the following contents:

[autorun]
OPEN=showhtml.exe

"showhtml.exe" is the little program that opens your HTML file, say index.htm. For the purpose of opening an HTML-file, there are several freeware and shareware programs on the Internet.

Or of course, since this is a Delphi related site :) so I assume you are a Delphi programmer, write your own short Delphi program showhtml.exe that starts the browser with the desired HTML file.


[ DelphiLand Discussion Forum ]