Download Browser Call
(33k zipped file).
.exe file size: 59k
Version 1.2

Return to Autorun.inf Maker

Browser Call

How do I launch an HTML page on my cd from an autorun.inf file?

This is perhaps the number one FAQ (frequently asked question) of users of Autorun.inf Maker.

The following information provides three methods for launching an html page from an autorun.inf file on a cd.

The Most Recent Solution:

The documentation for Version 5.0 of the Windows shell (Windows 2000) shows that this is now possible directly in an autorun.inf file via the shellexecute command. If your cd is intended only for users of Windows 2000, you can simply use the following format in your autorun.inf file:

You would refer to sub directories on the cd in the same method as other commands in the autorun.inf file (see the Autorun.inf Maker documentation under help). Simply type this into the body of the text of the autorun.inf file being created in Autorun.inf Maker before saving.

I have not tested this as I am not actively working with win2k at this time.

A Simple Solution in the Form of an Application:

You can also use a little standalone application that I've made in C++. It will open an application or a file (with an associated application/viewer on the end user's system) and allows for command line parameters to be sent to the application.

Browser Call accepts either one or two parameters. If you are sending two parameters, you must separate the two parameters with an ampersand (&).

It also has a function to replace a shortcut for the path where the invoked version of browsercall.exe resides (usually the root of the cd).

The shortcut is CDREPLACE. This must be typed in all capital letters. As it automatically checks to ensure that the path returned includes the directory slash, do not include that in your parameters:
correct: CDREPLACEindex.html

Note: Although it was designed to solve the problem of opening html pages, it will open any application and allow for the sending of parameters to the application. If you are sending more than one parameter to the application, just include them all in the second parameter of Browser Call. It also allows files of types other than HTML to be launched in their default viewer using the single parameter method.

Although all of these examples assume Browser Call is named browsercall.exe, feel free to rename browsercall.exe to a different name. Just change the default name to the new name in the examples.

The single parameter method requires that an application is associated with the HTML file type on the end user's system:
open=browsercall.exe fileName

To open an html file called index.html in the root of your cd, you can have this as your open command in autorun.inf:
open=browsercall.exe index.html
This would open the html page in the default viewer.

(Warning! You have no control over what the default viewer is. It could be any browser, html editor or even notepad. It is also possible that no viewer is specified on the user's system.)

The two parameter method requires that you select from the possible browsers that the user could have installed on their system and also requires that the user has installed the browser correctly.

These examples use the shortcut names for the the two most popular browsers. The shortcut name for Internet Explorer is iexplore and the shortcut name for Netscape is netscape. (FAQ: Where can I find the shortname for an application?)

The correct format for the two parameter method is:
open=browsercall.exe browserShortName&fullPathToHTMLPage

You will need to use the CDREPLACE method to create the path.

So, to open an html file called index.html in the root of your cd with the browser you have selected, you can have this as your open command in autorun.inf:
open=browsercall.exe iexplore&CDREPLACEindex.html
open=browsercall.exe netscape&CDREPLACEindex.html

This will open the page in the browser specified if the browser is properly installed on the end user's system.

Note: before this becomes a subFAQ of this FAQ, you can launch Internet Explorer in kiosk (fullscreen) mode by including the -k command line switch before the path to the web page. open=browsercall.exe iexplore&-k CDREPLACEindex.html

As you can see, both the single parameter and double parameter solutions are not perfect solutions. The first opens up the opportunity that the end user has associated something other than a browser with files with an HTML extension and the second does not provide any fallback should the user not have the browser you have selected installed on their system.

Download Browser Call (33k zipped file). Freeware. Tested on Windows 95+98 only. Additional testing in progress.

For do it yourselfers:

Create an application that runs the HTML page in it's associated application.

If you are a beginning programmer and need some assistance with this, see the ShellExecute or ShellExecuteEx examples in the Win32 SDK. This is rather simple program to create and is a nice way for a beginning programmer to get a taste of working with the windows api.

If ShellExecute is sent the name and extension of a file with an application association on the user's computer, it will open up the file in the default viewer application. In other words, you can just send it the name of the html file (example:index.html) as the application. It also accepts short names for applications. So, you can send it netscape or iexplore for the browser of your choice as the application and the file name (with a full path) as the parameter of the application.

(Note: GetCurrentDirectory in the win 32 SDK gives information on obtaining the directory path where your application resides. Use this to build a path to the HTML file on the cd.)

If you are not a programmer, this is a simple program to create and should be able to be done for relatively low cost by a freelance programmer (assume around 1-2 hours maximum for a seasoned programmer [browser call took less than a half hour, but is probably less than half of what you would really want in a custom program]).

Creating your own application or having a custom application built also provides additional benefits that will be covered later in the perfect solution.

The Perfect Solution:

A custom application that prompts the user for their preference in viewers and stores that in a registry entry for later use (so that the user is never prompted again). It should also check that the browser they selected actually exists each time and prompt the user for a different browser if it does not.

I could include such features in Browser Call, but the prompting dialogue box would be generic in appearance and, in my opinion, is not what most people would like as the first impression an end user has of their cd.

My best suggestion for a solution other than Browser Call or a custom solution is to investigate the many autorun front end programs that exist as shareware, freeware and commercial software.

AshzFall | Autorun.inf Maker