Open URL in NEW Microsoft Edge window

后端 未结 1 858
感动是毒
感动是毒 2021-01-19 20:38

I\'m writing an application (using C#) which needs to open provided URL in a NEW window of a specified web browser. The only browser I have problems with is Microsoft Edge.<

相关标签:
1条回答
  • 2021-01-19 21:00

    I am joining the line of desperate users of this program.

    Here are my findings from today searching of such simple job (for normal browser).

    1. Bat file - no go Using direct call for microsoft-edge:"url" or calling for 3rd party utility is resulting all the same. Still working "nicely" but once you want more tha one site, it will add up another TAB.
        @echo
    
        EdgeLaunch.exe "http://www.idnes.cz"
    
        EdgeLaunch.exe "http://www.seznam.cz"
    
        exit
    

    Sources: EdgeLaunch: http://www.edgemanage.emmet-gray.com/Articles/EdgeLaunch.html EdgeLauncher: https://github.com/MicrosoftEdge/edge-launcher

    1. Power shell script WARNING: as an research I am bypasing the security policy for the execution
        Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force;
    
        Start-Process -FilePath "msedge" -ArgumentList "http://idnes.cz"
        Start-Process -FilePath "msedge" -ArgumentList "http://novinky.cz"
    

    FUN FACT: if you leave the URLs blank, it will open new-windows. Once you add valid url...again in tabs.

    1. HTML-Javascript - seriously?!!! - nearly working For all the shitty as it sounds. It is working nearly, but. Such popups are normally restricted. And even when I 20 times allowed pupus from local html file. Edge somehow ignores this eevery new startup. (omfg)

    But, ok classic HTML structure, and a script on the page with:

     params  = 'width='+screen.width;
     params += ', height='+screen.height;
      params += ', top=0, left=0'
     params += ', fullscreen=yes';
     params += ', directories=yes';
     params += ', location=yes';
     params += ', menubar=yes';
     params += ', resizable=yes';
     params += ', scrollbars=yes';
     params += ', status=no';
     params += ', toolbar=yes';
     params += ', show=yes';
    
    window.open("http://idnes.cz",'window1', params);
    window.open("http://novinky.cz",'window2', params);
    

    Desperate fact: It opens the windows on a second manual attempt. But. Once you set "status=yes" attribute. It will again be the TAB.

    Thats all I got from internet. Nobody with solution of simply opening 2 damned windows with some webpages.

    0 讨论(0)
提交回复
热议问题