A Whirly Wiry Web article about ShellExe launches HTML files from AUTORUN.INF - A ShellExecute wrapper that delivers Authored by RockinFewl.

Query words: start HTML from autorun, start AVI from autorun, DOC, PDF, free CD tool.

This article applies to Windows 95+ and NT3.51+ | Local, CD-ROM.

Article styled for generic XHTML1 capable agents. Parts considered incompatible are marked [Part not rendered to your browser].
You may obtain this article styled for Microsoft Internet Explorer 5+ here.

ShellExe launches HTML files from AUTORUN.INF
A ShellExecute wrapper that delivers

So you want to display a HTML file when people put your CD in..

Search for "+autorun +html" in Google Groups and you get SIXTEEN THOUSAND results. Sure enough, quite a few people have been faced with the problem, and if you look well, you will also find a few handing a solution.

This article presents the WhirlyWiryWeb version of the launcher utility: today the leanest, the easiest and the most versatile you'll find on the Web!

Scope

Everything wrapped in less than 34 KB

ShellExe does not rely on anything extraordinary: that makes that ShellExe runs on all platforms from Windows 95 up, or NT 3.51 up. Internet Explorer is not required.

Usage

Autorun files explained

[autorun]
; you can only autostart an exe-file
; the path to the exefile must be fully qualified, 
; not possible is: "open=notepad readme.txt"
open = setup.exe
; the icon of the CD shown in the explorer
icon = mycd.ico

Where ShellExe differs from the rest

ShellExe ground-breaking idea is to support multiple document files.

ShellExe will attempt to open the document files one by one, untill an attempt succeeds. This allows to elegantly handle the case where the user doesn't have the proper viewer application installed.

Fanciness encouraged!

So why don't you start with a fancy Shockwave file?

In the case the user does not have the Flash player, you switch to a PDF file,

if the user doesn't have Acrobat Reader, you switch to a HTML file,

and if the user doesn't even have a Web browser installed, switch to a flat TXT file,

and tell him kindly to enter the millenium.

To accomplish that, the code required in autorun.inf is as simple as this:

open=ShellExe.exe intro.swf intro.pdf intro.html intro.txt

Download

Download ShellExe.zip (14K) by right clicking and choosing "Save target as" from the context menu. In the zip file is ShellExe.exe, the launcher tool you'll put on your CD. ShellExe is self-contained, so you don't need any extra's to make it work from CD.

The executable is signed for safe downloads -- after download, check the digital signature for 'Koen Mannaerts'. That's me.

An okay signature means that the file has never been tampered with.

Conclusion

You as an author want to be sure that viewers get your message, and your viewers aren't interested in detailed error messages.

Minimal platform dependencies, and the technique of multiple fall-backs ensure that your chance on success improves significantly. These are the things that distinguish ShellExe from the competition. ShellExe delivers.

Further Reading

Fellow programmers made similar launchers.


Also at the Whirly Wiry Web:

DHTML Gems
Fine DHTML tricks that may save your day. (Script)

Fighting eZula
The Web author's war against contextual advertising. (Script)

Detecting TopText and Surf+
Detecting eZula TopText and Spedia Surf+ Enabled Browsers (Script)

The Revealing HTTP Headers
View HTTP server response headers and unprocessed HTTP content. (Tool)

Launch-in-IE
Web pages can start applications. Securely. (ActiveX)

Open Office from a Web Page
Override IE's default behaviour to open Office documents in the browser window. (Script)

ShellExe launches HTML files from AUTORUN.INF
A ShellExecute wrapper that delivers (Utility)

Stealth Browser-Server Conversations
Exchanging data with the server without a page refresh. (Script)

Whirly Wiry Web Today
News, mission, and more skinnies you might be interested in. (General)

Dockyard
Material in test. (-)


The Whirly Wiry Web is RockinFewl's test bed and showcase in one.
All content, code and graphics are entirely crafted at our own premises, but material can freely be reused if charming credit is given.

WhirlyWiryWeb.com, 2001-2006. Address comments to Rockin at WhirlyWiryWeb.com