• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 957
  • Last Modified:

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

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!
  • 5
1 Solution
David Johnson, CD, MVPOwnerCommented:
what is the html that you use?
emjxAuthor Commented:
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.
emjxAuthor Commented:
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?
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

emjxAuthor Commented:
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).
emjxAuthor Commented:
Really good solution, explains the neccessary fix.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now