如何从c#winforms启动MS Edge? [英] How to launch MS Edge from c# winforms?

查看:687
本文介绍了如何从c#winforms启动MS Edge?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可执行文件MicrosoftEdge.exe不能像Windows中的其他EXE一样直接启动。我根据自己的经验并通过阅读

The executable MicrosoftEdge.exe cannot be launched directly like other EXEs in windows. I confirmed that from my own experience, and by reading this and that.

我也无法启动它通过我的c#winforms应用程序中的 Process.Start( MicrosoftEdge.exe)

I also cannot launch it via Process.Start("MicrosoftEdge.exe") in my c# winforms app.

必须有某种方法可以从winforms启动Edge,而无需借助第三方应用程序和其他杂物。我已经尝试了以下操作,但没有成功:

There must be some way to launch Edge from winforms without resorting to 3rd-party app and other clutter. I have already tried the following, with no success:


  1. Process.Start( MicrosoftEdge.exe)-未处理的异常

  2. Process.Start( microsoft-edge)-未处理的异常

  3. Process.Start(%windir%\explorer.exe shell:Appsfolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge)-未处理的异常

  4. Process.Start(@ c:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe)-否例外,但没有任何反应

  1. Process.Start("MicrosoftEdge.exe") - unhandled exception
  2. Process.Start("microsoft-edge") - unhandled exception
  3. Process.Start("%windir%\explorer.exe shell:Appsfolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge") - unhandled exception
  4. Process.Start(@"c:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe") - no exception, but nothing happens

注意:我可以使用上述方法#1轻松启动Chrome和Firefox。

Note: I can easily launch Chrome and Firefox using method #1 above.

如何从我的.net winforms应用程序启动MS Edge?

How can I launch MS Edge from my .net winforms app?

推荐答案

:最后是非常重要的,否则将不起作用

The ":" at the end is inportant, otherwise won't work

要以空白打开:

System.Diagnostics.Process.Start("microsoft-edge:");

或指定地址:

System.Diagnostics.Process.Start("microsoft-edge:http://www.google.com");

这篇关于如何从c#winforms启动MS Edge?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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