1

enter image description here

I want to enable the user to open a certain software on his desktop when he clicks the link on the browser, as shown on the image above.

I am a ware of the security issue, and also I am assuming the user has this software installed on his machine. What is the best way to achieve this?

OS: windows.

Rahman Saleh
  • 1,038
  • 1
  • 14
  • 20
  • Possible duplicate of [How to launch an application from a browser?](https://stackoverflow.com/questions/3057576/how-to-launch-an-application-from-a-browser) – fredrik Sep 18 '19 at 12:29
  • It is possible in HTA (Win / IE - unrestricted "web" page) I am using this for AutoIt scripts for example var shell = new ActiveXObject("Wscript.Shell"); var basePath = ".\\"; shell.run(basePath + "AutoIt\\AutoIt3_x64.exe \"" + basePath + n + '"'); But of course does not work in common browser (security limitations). In short rename htm(l) to hta and you can do way more. Or also using frameworks like Cordova(?) you can do a bit more than in common pages. – Jan Sep 18 '19 at 12:47
  • Yeah those solutions from 10 year old threads are probably not going to work anymore. I remember the glory days of .hta viruses masked as .jpg on certain image boards years ago :) – bdbdbd Sep 18 '19 at 15:31

1 Answers1

1

If it's only on your own machine you could consider registering an URI scheme, so instead of having it link to http://something you use something like openMyApp://blabla

https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)?redirectedfrom=MSDN

bdbdbd
  • 416
  • 5
  • 13