[英]How to open local machine exe file from server side script in c#? I Dont want ActiveXObect
How to open local machine .exe file from server side script in c#?如何从 C# 中的服务器端脚本打开本地机器 .exe 文件? I Dont want ActiveXObect.
我不想要 ActiveXObect。
你可以像下面的例子一样使用 Process.Start :
Process.Start("explorer.exe", linkPath);
In Internet Explorer, you can use a javascript link but you must set security options on Intranet to allow this.在 Internet Explorer 中,您可以使用 javascript 链接,但您必须在 Intranet 上设置安全选项以允许这样做。 I don't know of a way to do this with other browsers.
我不知道有什么方法可以用其他浏览器来做到这一点。
javascript:(new ActiveXObject('Shell.Application')).ShellExecute('shortcut.lnk');
Or或者
javascript:(new ActiveXObject('Shell.Application')).ShellExecute('pathtoprogram.exe');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.