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. |
|
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
![]() |
To create an AutoPlay CD, you include an AUTORUN.INF file in the root directory of the CD in the following format:
If you don’t have an icon to display, you can omit the ICON entry. The AutoPlay feature in Windows doesn’t call the Win32 ShellExecute() API, so you’re limited to .exe, .com or .bat files for the OPEN entry. That’s a problem, because you want to launch a .HTA file. Fortunately, the solution is relatively simple?create a short EXE program that calls ShellExecute(). The AUTORUN.EXE program included with the sample calls ShellExecute() for you, so it can launch an HTA file. The sample AUTORUN.EXE stub program accepts a single command-line argument?the name of the file to run, so if you wanted to the launcher to start an autorun.hta application, your AUTORUN.INF file would look like this:
If the ShellExecute() function returns an error (as it would if the target computer doesn’t have Internet Explorer 5 or greater), the autorun stub opens the CD root directory in Windows Explorer. Listing 1 shows the the AUTORUN.EXE source code. You don’t need a C compiler to use the sample code unless you want to modify the Autorun.exe program itself.
The HTA file displays your user interface (see Figure 1) and contains the script to launch your application’s setup program. Depending on your application needs, you may wish to launch one of several different types of setup program, as shown in the following sections. 1. Launching a Windows Installer (MSI) Setup
2. Launching an EXE File
Table 1 shows the parameters for the Wscript.Shell Run method:
Table 1: Parameters for the WScript.Shell Run method. If you have documentation on the possible return values from your setup program, you should check the return value and provide feedback to your users. The sample application has code to provide error feedback for common Windows Installer errors. 3. Checking for the .NET Framework Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) Heres a code fragment that checks for the .NET framework:
4. Reading the Registry
Such code is also useful for checking to see if your application is already installed. If it is, you can suppress the “Install Now” link, or display a message to the user. If the client machine doesn’t have Internet Explorer 5 (or greater) installed, AUTORUN.EXE fails gracefully by starting Windows Explorer. When I attempted to find out what happens when the user has disabled scripting (by setting the “Active Scripting” option to disabled for the Local Intranet zone), nothing happened. HTML applications appear to ignore the Internet security settings, which makes sense, because they’re treated as “local” applications. You can modify the sample code from this article to fit the visual style you want to project, and to check for whatever third-party applications you need. When you create your own HTA CD-Launcher, don’t underestimate the benefit of promoting other products and services, and of “branding” your installation?links to your other products or services can have more “click-through” appeal than in your Web site when presented as part of your setup. Check out DevX’s Project Cool and Web Development Zone for ideas on how to make your launcher even more visually impressive by using Flash, DirectX and DHTML. Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience. Related PostsAbout Our Editorial ProcessAt DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere. See our full editorial policy. ![]() What Is Amazon Ergo? AWS’s Open-Weight Coding Model Explained
Rashan Dixon
December 4, 2026
7:53 AM
![]() What Is the AWS DuckDB Acquisition? Amazon Athena and Glue Explained
Deanna Ritchie
December 3, 2026
7:57 AM
![]() 7 Technologies Making Warehouses Safer and More Efficient
Rashan Dixon
December 2, 2026
10:06 AM
![]() What Is Azure SRE Agent’s Multi-Cloud Support? AWS and Google Cloud Explained
Steve Gickling
December 2, 2026
7:54 AM
![]() Matching Application Security Testing to Your Release Cadence
Rashan Dixon
December 1, 2026
4:28 PM
![]() What Is GPT-6.2 Astra? OpenAI’s Benchmark-Topping Model Explained
Rashan Dixon
December 1, 2026
7:21 AM
![]() What Businesses Should Consider When Selecting Perimeter Security Solutions
Steve Gickling
November 30, 2026
4:44 PM
![]() What Is Anthropic’s Messages API Rust Rewrite? AI-Verified Migration Explained
Deanna Ritchie
November 30, 2026
11:18 AM
![]() What Is Gemini 4 Neon? Google’s New Mid-Tier AI Model Explained
Steve Gickling
November 27, 2026
8:12 AM
![]() What Is AI-Assisted Vulnerability Research? Chrome 158’s Claude-Found Bugs Explained
Rashan Dixon
November 26, 2026
8:02 AM
![]() The Cheapest Ways to Run an AI Agent 24/7 in 2027 (Ranked)
John Rampton
November 25, 2026
1:52 PM
![]() What Is Java4Shell? The Critical OpenJDK Base64 Vulnerability Explained
Deanna Ritchie
November 25, 2026
8:05 AM
![]() What Is the Agent-Framework PyPI Attack? Microsoft’s Credential Stealer Explained
Steve Gickling
November 24, 2026
7:59 AM
![]() One Design System for the Product and the Marketing Site, or Two?
Rashan Dixon
November 23, 2026
3:12 PM
![]() What Is NGINX2Root? The Critical NGINX RCE Vulnerabilities Explained
Rashan Dixon
November 23, 2026
7:28 AM
![]() How Fintech Is Transforming the Way Consumers Manage Monthly Bills
Steve Gickling
November 20, 2026
11:53 AM
![]() What Is .NET 11? C# 15 Union Types and AI Tooling Explained
Deanna Ritchie
November 20, 2026
10:51 AM
![]() Just-in-Time Privileged Access Should Be Scoped to Tasks, Not People
kellybryson
November 19, 2026
2:19 PM
![]() What Is Windows 11’s Coding Agent Telemetry? Privacy Risk Explained
Steve Gickling
November 19, 2026
7:41 AM
![]() What Is the cPGuard Supply Chain Attack? OpsShield’s Backdoor Explained
Rashan Dixon
November 18, 2026
8:31 AM
![]() What Is wfx-loot? The GitHub Actions Secret Stealer Attack Explained
Deanna Ritchie
November 17, 2026
8:38 AM
![]() What Is Gemini 4 Hydrogen? Google’s Fast, Low-Cost Coding Model Explained
Steve Gickling
November 16, 2026
8:08 AM
![]() What Is GPT-6 Cyber? OpenAI’s New Cybersecurity AI Model Explained
Rashan Dixon
November 13, 2026
8:08 AM
![]() What Is Microsoft’s November 2026 Patch Tuesday? Outlook Zero-Day Explained
Deanna Ritchie
November 12, 2026
8:08 AM
![]() What Is Claude Fable 5.2? Anthropic’s New Flagship Model Explained
Steve Gickling
November 11, 2026
8:12 AM
|

























