How to Launch an html file (web page) using Autorun

Here in this post we will see how to launch a .html  file automatically from a CD or DVD using Windows AutoRun feature. If you are new to Autorun, please read this post: What is AutoRun and AutoPlay ? How to Set it ?

If you want to know more about autorun commands, please read this post: How to Make a AutoRun CD or DVD Using Autorun.inf

The open command used in tte autorun.inf file cannot launch an html file (web page ) directly. Instead, we can open the webpage through some application.
The internet explorer browser application can be launched to open the web page by passing the web page filename (inclusive of relative path) as argument (parameter) to the application.


[autorun]
open=iexplore myfolder\mypage.html
icon=myicon.ico
label=Open webpage

In the above code, in the line open=iexplore myfolder\mypage.html, iexplore launches the internet explorer and myfolder\mypage.html is the filename (with relative path of file). In this example, when the CD is inserted, the internet explorer is launched (opened) automatically and loads the web page which is in the folder myfolder in the root directory of CD.

To make the browser goto a given web address (url) the following code can be used.

[autorun]
open=iexplore http://myonlinetext.blogspot.com
icon=myicon.ico
label=Goto MyOnlineText


In the last example, the browser internet explorer is launched and is directed to open or goto the web address http://www.myonlinetext.blogspot.com

If you want to know more about using Autorun Commands in Autorun.inf, i recommend to read the following post to use the commands effectively:
How to Make a AutoRun CD or DVD Using Autorun.inf

No comments :

Post a Comment