如何使用 .net 应用程序在 Internet Explorer 中运行 exe 文件
我有micromedia flash播放器的exe文件。我可以使用以下代码从 .net 应用程序运行此文件
private void button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("peopledisplay.exe");
//System.Diagnostics.Process.Start("iexplorer.exe", "peopledisplay.exe");
}
。此代码在单击按钮后启动 micromedia flash 文件。我希望单击按钮后在 Internet Explorer 中启动此文件。如何做到这一点?您能给我提供任何可以解决上述问题的代码或链接吗?
I have the exe file of micromedia flash player. I am able to run this file from the .net application by using the following code
private void button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("peopledisplay.exe");
//System.Diagnostics.Process.Start("iexplorer.exe", "peopledisplay.exe");
}
This code launches the micromedia flash file after clicking the button. I want this file to be launched in the internet explore after clicking the button. How to do this ? Can you please provide me any code or link through which I can resolve the above issue ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
试试这个:
你需要在IE的命令行上指定flash文件的路径。确保用引号将路径引起来。当然,这并不能保证 IE 实际上能够运行该文件,您可能会发现安全限制(区域规则、组策略)会阻止这种情况。
Try this:
you need to specify the path to the flash file on the command line to IE. Make sure you enclose the path with quotes. Of course this is no guarantee that IE will actually be able to run the file, you may find that security restrictions (zone rules, group policy) prevent that.
您在此代码中所做的就是告诉服务器打开可执行文件,而不是浏览器客户端。您需要一些如下所示的 JavaScript,但这可能仅在 Internet Explorer 中有效,并且仅当用户在 IE 选项窗口中显式设置权限时才有效。
What you do in this code is tell the server to open the executable, not the browser client. You'd need some JavaScript like the following, but that will probably only work in Internet Explorer, and only if the user explicitly sets the permissions in the IE options window.