2

Possible Duplicate:
how do I create my own URL protocol? (e.g. so://…)

I was wondering if it is possible to start an application using a browser url. Just like origin(origin://), itunes(itms://), Trackmania(tmtp://) ...

I supose a registere setting needs to be changed for this. But where can I find this, and how do I get the parameters using a C# program.

Thank you, Jerodev


edit: I have been able to add an own protocol handler using the registery. The handler works with all browsers except for google chrome. Does anyone know how to enable this?

Community
  • 1
  • 1
Jerodev
  • 32,252
  • 11
  • 87
  • 108
  • What are you asking? You are writing a desktop app and want to start it with a url as a parameter? – Philip Oct 03 '11 at 14:02
  • do you want to use the browser as if it were explorer and start a program as if start from explorer? or do you want to run a program within the browser? – mtijn Oct 03 '11 at 14:03
  • I want to let an application start when a user opens an url. For example: 'test://param'. – Jerodev Oct 03 '11 at 14:22
  • @stuart: that is exactly what i'm looking for, but that example only works with internet explorer. – Jero – Jerodev Oct 03 '11 at 14:23
  • Keep in mind you can use the WebBrowser control from within C# depending on the specifics of what you are trying to accomplish. – crlanglois Oct 03 '11 at 16:29

1 Answers1

0

To start application from web browser is not easy, because most desktop applications require full trust and also full access to your system, and by default web browser doesn't permit you to do so.

The best way to really run your app from web browser is by using Silverlight Out of browser or using Adobe's AIR. But if you are just wanting to deploy your app from web browser, you can use Microsoft ClickOnce. It's quite easy and straightforward, and .NET 3.5's ClickOnce supports Firefox and Chrome, not just IE.

To use ClickOnce, see this on MSDN Library:

http://msdn.microsoft.com/en-us/library/t71a733d(v=VS.90).aspx

Eriawan Kusumawardhono
  • 4,796
  • 4
  • 46
  • 49