admin管理员组

文章数量:1431997

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.

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.

Share Improve this question edited Sep 19, 2019 at 15:10 Rahman Saleh asked Sep 18, 2019 at 12:26 Rahman SalehRahman Saleh 1,1182 gold badges14 silver badges20 bronze badges 3
  • 1 Possible duplicate of How to launch an application from a browser? – fredrik Commented Sep 18, 2019 at 12:29
  • 1 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 mon 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 mon pages. – Jan Commented Sep 18, 2019 at 12:47
  • 1 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 Commented Sep 18, 2019 at 15:31
Add a ment  | 

1 Answer 1

Reset to default 2

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./en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)?redirectedfrom=MSDN

本文标签: javascriptOpen a desktop app by clicking on a link on the browserStack Overflow