从网站启动可执行文件? [英] Launching an executable from a website?

查看:103
本文介绍了从网站启动可执行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个仅在Intranet上运行的站点,并且有权访问此Intranet的计算机将安装此可执行文件.我们没有任何您想打开[filename] .exe吗?"提示.单击一个链接,程序开始运行.

We're developing a site that will only run on the intranet, and computers with access to this intranet will have this executable installed. We can't have any "Would you like to open [filename].exe?" prompts. Click a link and the program begins running.

我意识到,赋予网站在客户端计算机上运行可执行文件的能力非常非常糟糕,但是管理层拒绝对此屈服.

I realize that giving websites the ability to run executables on the client machine is very, very bad, but management refuses to budge on this.

机器将安装Windows(XP或更高版本)和Firefox 3.

Machines will have Windows (XP or up) with Firefox 3.

推荐答案

我们正在开发一个仅在Intranet上运行的站点,并且有权访问此Intranet的计算机将安装此可执行文件.

We're developing a site that will only run on the intranet, and computers with access to this intranet will have this executable installed.

这是否意味着EXE已安装在桌面上?您只想从网站启动它?

Does this mean the EXE is already installed on the desktop? You just want to launch it from the website?

如果是这样,则可以将EXE与 MIME内容类型和当用户单击它时,它将启动.

If so, you can associate the EXE with a MIME Content Type and when the user clicks it, it will launch.

为您的EXE名称选择内容类型和文件扩展名,例如:


CauseChaos.exe
Associated with .chaos file extenstion
Content Type will be: application/chaos

通过EXE安装将文件扩展名与EXE相关联.我在这里使用InnoSetup展示

[Registry]
Root: HKCR; Subkey: .chaos; ValueType: string; ValueData: CauseChaos; Flags: uninsdeletekey
Root: HKCR; Subkey: CauseChaos; ValueType: string; ValueData: CauseChaos Tool; Flags: uninsdeletekey 
Root: HKCR; Subkey: CauseChaos\DefaultIcon; ValueType: string; ValueData: {app}\CauseChaos.exe,0; Flags: uninsdeletekey
Root: HKCR; Subkey: CauseChaos\shell\open\command; ValueType: string; ValueData: "{app}\CauseChaos.exe ""%1"""; Flags: uninsdeletekey

通过EXE安装将MIME内容类型与文件扩展名相关联.

[Registry] (continued...)
Root: HKCR; Subkey: HKCR\Mime\Database\Content Type\application/chaos; ValueType: string; ValueName: Extension; ValueData: .chaos; Flags: uninsdeletevalue

这篇关于从网站启动可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆