Javascript 如何使用asp.net4从网页启动EXE
我使用以下代码:Javascript 如何使用asp.net4从网页启动EXE,javascript,internet-explorer,wsh,jscript,Javascript,Internet Explorer,Wsh,Jscript,我使用以下代码: <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"); } 函数Lau
<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");
}
函数LaunchApp(){
如果(!document.all){
警报(“仅适用于Internet Explorer”);
返回;
}
var ws=新的ActiveXObject(“WScript.Shell”);
ws.Exec(“C:\\Windows\\notepad.exe”);
}
但这不起作用。(链接已禁用)
运行Exe文件
您需要在IE中具有非常特定的权限才能正常工作。@SimonWhitehead:IE中的特定权限是什么?请帮忙me@nas105我把你的问题重新标记了。这与ASP.NET、.NET或C#无关。是关于JScript和IE的。对不起。我写错了。编辑。。。请帮助我进行互联网设置。
<a href="javascript:LaunchApp()">Launch the executable</a>