0

Alright I have always accepted the answer of it's impossible to open a program on a local machine through javascript or html due to the obvious security vulnerabilities. However, the best solution we can find right now to a problem with a browser based POS system is to launch a desktop application for certain things.

The reason i'm second guessing that it may be possible is because of magnetLinks(which i know little about other than that I click it and my browser prompts me whether it's okay to launch the application and all of a sudden uTorrent is running with the data loaded in it. We have root access to every machine that will be running this web application and can configure the machine in any way needed so running chrome with flags or whatever is an option, i would just prefer to avoid installing activeX objects.

Edit: I have seen another similar question, however; in this instance all of the machines running the application are configured, installed, and maintained by our company.

PC3TJ
  • 852
  • 5
  • 16
  • 2
    Possible duplicate of [how do I create my own URL protocol? (e.g. so://...)](http://stackoverflow.com/questions/389204/how-do-i-create-my-own-url-protocol-e-g-so) – gre_gor Nov 01 '15 at 02:03
  • @gre_gor i'm sorry but i see 0 connection between these questions! – PC3TJ Nov 01 '15 at 02:04
  • That is how clicking on a link opens a local applications, link, like you mentioned magnet links opening uTorrent. – gre_gor Nov 01 '15 at 02:12
  • 2
    @gre_gor Yes but they are still not the same question. Simply directing to a question about registering a URI scheme with no explanation does not answer the question. And using such flags are intended to remove duplicate questions. Not two completely unrelated questions with answers that involve some similar elements. – PC3TJ Nov 01 '15 at 02:17
  • actually duplicates are duplicate because the answers are the same, not because the title and question body are exactly the same, and just because you don't understand an answer that is correct does not make it incorrect, it just means you need to do a little bit more work to understand what you are doing and why it is an answer. –  Jun 09 '16 at 23:40
  • @JarrodRoberson however, when asking the question there is no way to search for that without knowing that that question answers this. And as you are aware users are highly penalized when the community closes a question in such a way. And a "Question" being duplicate should not relate to the "Answers" being the same. As if thats not somebodies question they would never land on the same answer – PC3TJ Jun 09 '16 at 23:45
  • Does this answer your question? [How to launch an application from a browser?](https://stackoverflow.com/questions/3057576/how-to-launch-an-application-from-a-browser) – Liam Jun 26 '20 at 14:03

1 Answers1

2
  • You need a protocol defined in advance.
  • Your desktop app needs to register to the system as a potential handler of the protocol.
  • You need a browser that can handle opening custom protocols.

Since you have root access to the kiosk you have, you can install a modern browser like Chrome or Firefox. Then, make sure your desktop application registers itself to the system with the protocol. When the browser opens the link, it detects the custom protocol, looks for an app in the system that handles it, and suggests it to the user. Usually the first time you access the protocol, the browser will throw a prompt to select which software installed should handle it.

Joseph
  • 117,725
  • 30
  • 181
  • 234