Protocol handler different than XP?

M

Mesan

I've added a custom protocal handler that works great in XP, but when
I try to run it in Vista I get the following error:
"This file does not have a program associated with it for performing
this action. Create an asociation in the Set Associations control
panel."

When I pull up "Associate a file type or protocol with a specefic
program" from the Control Panel, my handler is not listed, nor is
there a way to add a protocol.

In XP I would just add registry keys to the HKCR\ hive, setting the
DefaultIcon key and a shellKey\open\command key.

What has changed in Vista? What am I missing? I have been unable to
find a post describing how to create a custom protocol handler in
Vista - surely I'm not the only one that wants to do that, so I've got
to be missing something.

Thanks for your help,

Mesan
 
M

Mesan

Hi Mesan,

Is it a handler for Search? Maybe you need to add DocumentType entries for
your handler? See:
http://msdn2.microsoft.com/en-us/library/bb266527.aspx

No, it's a handler to launch one of our LOB apps. That way we can
embed links in our programs and documents to launch a program and pull
up a specific customer or loan, for example. It's been enormously
useful and we've started to rely on it rather heavily. I'd sure like
to find out how to make it work in Vista.

Any other ideas?
 
A

Andrew McLaren

Mesan said:
No, it's a handler to launch one of our LOB apps. That way we can
embed links in our programs and documents to launch a program and pull
up a specific customer or loan, for example. It's been enormously
useful and we've started to rely on it rather heavily. I'd sure like
to find out how to make it work in Vista.

Hi Mesan,

In that case ... sorry, I dunno :-(

As a simple test, I compiled and installed the "alert" protocol handler
sample from MSDN:
http://msdn2.microsoft.com/en-us/library/aa767914.aspx#url_inv

On XP, this "alert" handler worked fine, as expected. Then I installed in in
Vista, creating the same HKCR keys to register the handler. The first time I
tried this, I got the same error you saw! Eureka, I thought - we were onto
something! Then I realised I was on 64 bit Windows; and I'd configurred the
"alert" keys under the 64 bit HKCR instead of under the SysWow64
Classes_Root. So I installed the "alert" protocol handler on a 32-bit Vista
machine instead; and this time the test "alert" handler worked perfectly,
the same as it did on XP.

The only diference is that on Vista, Internet Explorer throws up a "A
website wants to open content using this program on your computer" warning,
when the protocol handler kicks in. But I clicked OK to the warning, then IE
ran the alert.exe app with no problem. So in this minimal test scenario, all
that was needed to register and enable the alert protocol handler on Vista
was the same few HKCR reg keys that you'd use on XP.

I'm sure you'll be able to get your custom handler running on Vista ... but,
you may need to do a little bit of debugging to find out why it isn't
running, or what Vista is unhappy about. URLMon.dll in IE7 does not handle
exceptions itself, so you may need to put an exception handler into your own
code to catch the exception (if there is one).

Since this is more a developer-oriented question, you may get better results
by posting to one of the MSDN forums (whichever one looks most appropriate
for your environment):
http://forums.microsoft.com/msdn/default.aspx?siteid=1

Hope this helps a little bit; good luck with it. I'm sure you'll get it
working in the end.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top