3

I'd like to be able to launch a ClickOnce application on a users desktop via an Email link. Basically, I'd construct a valid link with parameters and the user would click the email link in Outlook and it would automatically launch the application and pass in the parameter I specify.

I think that I've found something that works.

http://myapplicaitondomain.com/application/MyApplication.Application?param1=14322&param2=5295

This appears to me to launch the CL app on the users machine, and install it if it isn't already. The application starts and returns the entire URL in the process, which means I would have to parse it for the params.

Is this the right way to do this ? Is it reliable ? It does not appear to work if Chrome is the default browser, but only IE will launch the app from the URL link. Is there a more appropriate way ? What about registering an application handler and creating a specially formatted link, would that be better ? The app is an offline CL app -- but seems to launch like I demonstrated above. The users would have more than one way to open it up - but the email link is a convenience because I can pass a GUID to point the user to make the app open to a particular place.

Thank you!

Matthew M.
  • 3,422
  • 4
  • 32
  • 36

1 Answers1

3

Launching via HTTP

Currently, ClickOnce installations will launch only if the URL to the deployment manifest is opened using Internet Explorer. A deployment whose URL is launched from another application, such as Microsoft Office Outlook, will launch successfully only if Internet Explorer is set as the default Web browser.

Reference: http://msdn.microsoft.com/en-us/library/ms228998.aspx

Problem: You can only pass information in a query string when your application is being launched using HTTP, instead of using a file share or the local file system. (Chrome and Firefox will download your .application file)

Reference: http://msdn.microsoft.com/en-us/library/ms172242.aspx

Launching via Custom Protocol

Only works when your application is installed else your custom link doesn't work.

Some workarounds but not very reliable: How to check if a custom protocol supported

(And maybe some security problems with your custom protocol because of ClickOnce security settings with Location etc.)

Launching via another Application

You can launch your ClickOnce Application with Arguments via another Application.


I would use a custom setup and then simply install your app with custom arguments or start your app with custom arguments when installed.

Community
  • 1
  • 1
Skomski
  • 4,827
  • 21
  • 30
  • The arguments passed into the application will change depending upon which email the user is looking at. Basically, it sounds like the best solution may be to register a custom handler which would be the most reliable method (FireFox/Chrome). – Matthew M. Aug 12 '11 at 19:45