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.
Opening a page using browser exe doesn't work at all. Browser window does not even appear.
I've searched over the internet and found another way:
This code opens the page, but attaches it to an existing window, if any.
Is there a way to open the page in a NEW window?
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).<ol><li>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.</li> </ol>
@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<ol start="2"><li>Power shell script WARNING: as an research I am bypasing the security policy for the execution</li> </ol>
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force; Start-Process -FilePath "msedge" -ArgumentList "http://idnes.cz" Start-Process -FilePath "msedge" -ArgumentList "http://novinky.cz"
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.