Joe*_*Joe 29 asp.net web-applications internet-explorer-7
这是一个内部Web应用程序,我们希望Web页面包含指向Win32 EXE的多个实用程序的链接.EXE是我们信赖和生产的.(不在乎它是否可以运行或保存).我尝试了直接链接(例如C:\notepad.exe),它只在本地工作.(这将是网络上的一部分).尝试过File:///但没有用.IE7是需要的浏览器.
JLo*_*pez 35
这假设exe是您在用户计算机上知道的地方:
<a href="javascript:LaunchApp()">Launch the executable</a>
<script>
function LaunchApp() {
if (!document.all) {
alert ("Available only with Internet Explorer.");
return;
}
var ws = new ActiveXObject("WScript.Shell");
ws.Exec("C:\\Windows\\notepad.exe");
}
</script>
Run Code Online (Sandbox Code Playgroud)
文档:ActiveXObject,Exec方法(Windows脚本宿主).
Cer*_*rus 29
怎么样的:
<a href="\\DangerServer\Downloads\MyVirusArchive.exe"
type="application/octet-stream">Don't download this file!</a>
Run Code Online (Sandbox Code Playgroud)
Lar*_*y K 27
您可以通过使用Fiddler在使用链接时按照操作查看iTunes的工作方式:http: //phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id = 80028216
请注意,安装时,exe会为浏览器的"itms"传输安装URL协议处理程序.
不是一个复制的简单工程项目,但绝对可行.如果您继续这样做,请考虑使相关软件开源.
che*_*atu 11
在Windows中,应用程序的指定协议可以在注册表中注册.在这个msdn doc中显示了将应用程序注册到URI方案.
例如,要启动可执行文件'alert.exe'.可以注册以下项目.
HKEY_CLASSES_ROOT
alert
(Default) = "URL:Alert Protocol"
URL Protocol = ""
DefaultIcon
(Default) = "alert.exe,1"
shell
open
command
(Default) = "C:\Program Files\Alert\alert.exe"
Run Code Online (Sandbox Code Playgroud)
然后你可以编写一个html进行测试
<head>
<title>alter</title>
</head>
<body>
<a href="alert:" >alert</a>
<body>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
171228 次 |
最近记录: |