Protocol for a desktop app (exe) not working for Internet Explorer

Posted on 2012-08-17
Last Modified: 2012-08-28
I have created a protocol that I want to use to open an EXE (created in Visual Studio using c#) via an html link in a webpage.

The expected result was that clicking on the link, the application would open. This does work for Firefox (and I can see the protocol listed in the Firefox protocol list) but does not work for Internet Explorer (and is not in the Windows protocol/associations list.

The registry keys are as follows:

Windows Registry Editor Version 5.00

"URL Protocol"=""
@="URL:CDL Protocol"

@="\"Label Printer.exe,1\""



@="\"C:\\Users\\user\\Documents\\Visual Studio 2010\\Projects\\Label Printer\\Label Printer\\bin\\Debug\\Label Printer.exe\" %1"

Open in new window

When I click on the HTML link (example below), in Firefox I get a popup message asking if I want to open the link in the specified application. On clicking OK, the application opens. Internet Explorer simply displays the "Cannot display the webpage" screen.

<a href="CDL:OPENFORM?data=Name|Address 1|Address 2|Town|AB12 3CD">Launch</a>

Open in new window

At the moment, I really can't see why this doesn't work - the lack of association in the Windows associations list is pretty key, but my registry key is not really any different from the Skype one I also have which does work in both IE and Firefox.

Thanks for the help!
Question by:emjx
    LVL 77

    Expert Comment

    by:David Johnson, CD, MVP
    what is the html that you use?

    Author Comment

    The two links I have tried are as follows:

    <a href="CDL:OPENFORM?data=My Name|My Address|Town|County|AB12 3CD">Launch</a><br />
    <a href="CDL://OPENFORM?data=My Name|My Address|Town|County|AB12 3CD">Launch</a>

    Open in new window

    The first link works in Firefox and Safari, and the data parameter is passed to the application. The second link works in Firefox and Safari but the data parameter is not passed to the application.

    [Edit - 20/08/12]
    I have also tried:
    <a href="CDL:OPENFORM">Launch</a>

    Open in new window

    i.e. no parameters.

    Author Comment

    Some further testing shows that the following entered in Windows Explorer also works. Looks like just IE and the associations list don't pay any attention to keys specified in HKEY_CLASSES_ROOT.

    cdl:OPENFORM?data=hello world

    Open in new window

    Am guessing that there is also somewhere else in the registry that needs a entry. Any ideas? Anyone?

    Accepted Solution

    A massive thanks to..................... me...

    How did I fix this issue:

    Simply added a new registry key to HKEY_CLASSES_ROOT that was 9 characters long. Apart from that, it was identical to the original CDL key. CDL was not a duplicate either (the fact that it works in Firefox kind of proves that).

    Therefore, due to the lack of any info to say otherwise, I can only assume that when adding a new protocol handler, it needs to have a name that is greater than 3 characters in length (although have not tested to find that actual length).

    Author Closing Comment

    Really good solution, explains the neccessary fix.

    Author Comment


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Bada platform is becoming more and more famous this days and people talking about same. Some friends included those who have bada OS mobile asked me "what is bada?"and "what its features?". That encouraged me to research and write this article. [st…
    Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
    In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
    This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now