I need to open URL in Microsoft Edge (on Windows 10). When I invoke
start shell:AppsFolder\\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge http://www.go
It will do more or less the same thing in good old dos script fashion
set add=%1
if %add%$ ==$ set add="about:blank" && goto launch
rem http://
set test=%add:~0, 7%
if %test% == http:// goto launch
rem ftp://
set test=%add:~0, 6%
if %test% == ftp:// goto launch
rem https://
set test=%add:~0, 8%
if %test% == https:// goto launch
rem add http
set add=http://%add%
:launch
start microsoft-edge:%add%
I too was wondering why you can't just start microsoftedge.exe, like you do "old-style" applications in windows 10. Searching the web, I found the answer -- it has to do with how Microsoft implemented "Universal Apps".
Below is a brief summary taken from that answer, but I recommend reading the entire entry, because it gives a great explanation of how these "Universal Apps" are being dealt with. Microsoft Edge is not the only app like this we'll be dealing with.
Here's the link: http://www.itworld.com/article/2943955/windows/how-to-script-microsofts-edge-browser.html
Here's the summary from that page:
"Microsoft Edge is a "Modern" Universal app. This means it can't be opened from the command line in the traditional Windows manner: Executable name followed by command switches/parameter values. But where there's a will, there's a way. In this case, the "way" is known as protocol activation."
Kudos to the author of the article, Stephen Glasskeys.
I would like to recommend:
Microsoft Edge Run Wrapper
https://github.com/mihula/RunEdge
You run it this way:
RunEdge.exe [URL]
Examples:
RunEdge.exe http://google.com
RunEdge.exe www.stackoverflow.com
It is not exactly new way how to do it, but it is wrapped as exe file, which could be useful in some situations. For me it is way how to start Edge from IBM Notes Basic client.
The following method should work via Command Prompt (cmd):
start microsoft-edge:http://www.cnn.com
and a shortcut:
C:\Windows\System32\cmd.exe /c start shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge http://localhost:6516
I want to complement other answers here in regards to opening a blank tab in Microsoft Edge from command-line.
One observation that I want to add from my end is that Windows doesn't detect the command microsoft-edge
if I remove the trailing colon. I thought it would be the case when I've to open the browser without mentioning the target URL e.g. in case of opening a blank tab.
How to open a blank tab in Microsoft Edge?
microsoft-edge:about:blank
start microsoft-edge:about:blank
You can also initiate a search using Edge from run prompt. Let's say I've to search Barack Obama
then fire below command on run prompt-
microsoft-edge:Barack Obama
It starts Microsoft's Bing search website in Edge with Barack Obama
as search term.