PDA

View Full Version : Autorun to HTML



23-05-2002, 07:23 PM
Recently I made a cd that contained a photo and some other things that I wanted to send. I wanted to make the cd as easy to use as possible, and since the only thought of programing experience is with Web pages, I made a couple of pages and linked everything off it. In the way of making it easier I thought I would fiddle around and see if I could make the cd Automaticly run and load the index page when the CD was put in the drive. Creating the Autorun file was easy. However when I made the CD It wouldn't automaticly run.

Now my question. Can autorun files load HTML pages directly, if so how?
Or
Do you have to have the Autorun file load another *.exe file that loads the HTML file?
If so is it easy to do this, if it is how do I do it. Or is there a web site where I can download a file the will load the Html page I want.

Thanks

:)

23-05-2002, 08:20 PM
Try this site
http://www.karenware.com/powertools/ptautorun.asp

24-05-2002, 11:05 AM
This can be done thus:

Make your autorun.inf file with the following lines:

[AUTORUN]
ICON=view.ico
open=Wscript ShellExecute.js //B //nologo

The ICON line is the icon you wish to load into the address bar. You may rename this of course.

Then make a file named shellexecute.js containing the following script:

WshShell = WScript.CreateObject('WScript.Shell');

WshShell.Run('index.html', 1, 0);

WScript.DisconnectObject(WshShell);

(Note the line breaks...this script should be on 5 lines including empty lines.)

Also note that some antivirus will try to block this script but it can be allowed as it is only running your index.htm page.

Hope you have some luck,
Matt

24-05-2002, 01:52 PM
The Autorun.inf should look like this (showing the line numbers which you should leave out of course. The formatting gets lost on the message board:

1...[AUTORUN]
2...ICON=view.ico
3...open=Wscript shellExecute.js //B //nologo

NB: The 3rd line should be one line.
Hope this is a bit clearer. Drop me a line if you like: matt@rbsnz.com

24-05-2002, 02:18 PM
Thank you.

This site will come in very handy. I decided to write the code myself with the help of The other respondent. But thanks all the same.

:)

24-05-2002, 02:20 PM
Matt

Thank you Very much, for this code. I'm sure it will come in very handy.

:)