How can I launch a windows application from a webpage?

流过昼夜 提交于 2019-12-05 10:41:54

Make each button be a link to download a company template file for the given application. For example, the "Excel" button would download and the user should be prompted to open it with Excel.

For instance, try clicking one of the links here:

http://www.google.com/#sclient=psy&hl=en&q=template+filetype:xls

Linking to static files on the web server should be sufficient, so long as your server sends the correct MIME-Type or Content-Type.

You will probably have to adjust browsers' security settings to allow them to follow the links, but you should be able to use URLs of the form file:///C:\\Program Files\\Notepad.exe (You might prefer to use normal slashes / instead, as you don't have to watch out for how many copies of \ are needed to get past quoted string interpretation in whatever you're using to design the web page(s).

Using IE on a local intranet we have implemented this in an ActiveX control. Josh Pearce's solution works for those types of apps with MIME types, but not all apps you may wish to open would work this way.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!