最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Open a desktop app by clicking on a link on the browser - Stack Overflow

programmeradmin2浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论