0

I have a requirement wherein I need to launch an application (assumed to be installed on the user's machine) from a webpage.

I found that there are several ways of doing so, but I would like to know if this is an acceptable solution. Is it OK to execute applications from a webpage or is this some kind of an anti-pattern?

EDIT: To clarify, I did not mean that the executable will launch on loading the webpage, rather as Florian mentions, it will be on a user click, so the user knows that an executable will be launched. My question was is even this ok?

5
  • Sounds like a terrible idea to me. Can you expand on why it's a requirement? It would probably help if you said a bit more about why you're ultimately trying to do.
    – Telemachus
    Jun 6, 2012 at 14:10
  • I think it's ok but depends on how you launch it. How do you want to launch it then?
    – Ray Cheng
    Jun 6, 2012 at 14:15
  • Are you working at Microsoft? Jun 7, 2012 at 4:50
  • @Pumbaa80. The answer is no, but I am wondering if the question is a sarcastic one :)
    – Raam
    Jun 7, 2012 at 6:48
  • Yea, I forgot the smiley :) I couldn't help thinking of ActiveX Jun 7, 2012 at 21:36

1 Answer 1

2

If you can do this, it is most likely a security flaw. Can you imagine if I run all your applications just because you visited my webpage?

However, you can do something like skype does: adding a protocol that your desktop application handles. This means that when the user will click on the link, it will launch the desktop application handling the protocol.

Skype's links are like this:

<a href="skype://username">Skype me!</a>

And the skype program is the default handler of the skype protocol for your operating system, so it will run it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.