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.
I also cannot launch it via Process.Start("MicrosoftEdge.exe")
in my c# winforms app.
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:
Process.Start("MicrosoftEdge.exe")
- unhandled exceptionProcess.Start("microsoft-edge")
- unhandled exceptionProcess.Start("%windir%\explorer.exe shell:Appsfolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge")
- unhandled exceptionProcess.Start(@"c:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe")
- no exception, but nothing happensNote: I can easily launch Chrome and Firefox using method #1 above.
How can I launch MS Edge from my .net winforms app?
How to start Microsoft Edge from the Run window. Press Win + R on the keyboard to open the Run window. In the Open field, type “microsoft-edge:” and press Enter on the keyboard or click or tap OK. Microsoft Edge is now open.
May 2021: Edge is located in C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe. It can be found by either goint to that location or shell:Appsfolder.
First, open the Start menu. You can do that by pressing the “Start” key. Type “cmd” and press Enter to open the Command Prompt window. After opening the command line window, use the “start msedge” command to open the Edge browser.
The ":" at the end is inportant, otherwise won't work
To open in blank:
System.Diagnostics.Process.Start("microsoft-edge:");
or specifying an address:
System.Diagnostics.Process.Start("microsoft-edge:http://www.google.com");
Process.Start can take 2 parameters
string url = "http://www.google.com";
System.Diagnostics.Process.Start("msedge.exe", url);
Browsers:
You can use a small workaround to open Microsoft Edge from CMD with this code
string url = "https://www.google.com";
// Starts Microsoft Edge with the provided URL; NOTE: /C to terminate CMD after the command runs
System.Diagnostics.Process.Start("CMD.exe", $"/C start msedge {url}");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With