How to open URL in Microsoft Edge from the command line?

前端 未结 12 742
天涯浪人
天涯浪人 2020-11-29 23:44

I need to open URL in Microsoft Edge (on Windows 10). When I invoke

start shell:AppsFolder\\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge http://www.go         


        
12条回答
  •  忘掉有多难
    2020-11-30 00:05

    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%
    

提交回复
热议问题