Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

How To Launch CDs with HTML Applications

Use HTML Application (HTA) files to provide an impressive and functional CD launcher for your applications.


advertisement


his article describes how to use an HTML Application (HTA) file that you can use to launch CD's. Developers have had the ability to create HTML applications since the release of Internet Explorer (IE) 5, so they're not a new technology. HTML Applications have read/write access to the file system and the registry, and—because they run locally—can launch COM components that are not marked safe-for-scripting. Also, HTAs don't show the Internet Explorer toolbar or menus, so a running HTA looks more like a "real program" than like a web page. A well-designed CD launcher can raise end users' confidence in your applications, even before they install them. Launcher programs can present read-me or pre-installation requirements information to the end user, provide help, check for required third-party software or operating system requirements, advertise other products or services available and (most importantly) simplify the process of installing the software. The ease-of-use factor is important enough that Microsoft designated CD AutoPlay as a requirement for compatibility with their "Designed for Windows" logo program.

Fast Facts
Target machines must have 32-bit Windows (any version) with Microsoft Internet Explorer version 5 or higher installed. You can create and modify HTML Application (.hta) files with any HTML or text editor. The sample Autorun.exe program that accompanies this article was compiled using Microsoft Visual C++ 6.0, but you could use any Windows C compiler. You don't need a C compiler to use the sample code unless you want to modify the Autorun.exe program itself.

An HTML application is exactly the same as an HTML file, but with an .hta extension.
CD Launcher Options
You can create an "AutoPlay" CD launcher using any of several mechanisms, including:
  • Writing a simple Visual Basic program. The main problem with using a Visual Basic program is the need for the VB runtime on the target system. You can work around this issue by installing the VB runtimes with an autorun "stub" program, but this can get awkward, since your main setup may also install the VB runtime files, and your launcher will have a lock on the DLL files, which would cause a reboot prompt.
  • Launching setup.exe directly. If you don't want to provide help or information, promote your products and services or check for applications that your application depends on you can launch your setup.exe.
  • Using a commercial launcher. Several commercial (and shareware) products exist to create CD launchers. These have many of the same benefits as using an HTML application, but they also have a learning curve and cost.. With HTML applications, in contrast, you leverage your existing HTML and DHTML skills for presentation, and your existing COM and scripting skills for extended functionality.
  • Writing a .NET launcher. The .NET framework is not yet present on most target systems; however, when the framework becomes ubiquitous, using .NET applications may be a viable alternative.
  • Using an HTML file. With an HTML file, you can't read the registry and you cannot launch a setup executable without eliciting security warnings.
The Sample Application


Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.