21597

Open URL in NEW Microsoft Edge window

<h3>Question</h3>

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.

Process.Start("C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe", "https://google.com");

I've searched over the internet and found another way:

Process.Start("microsoft-edge:https://google.com");

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?


<h3>Answer1:</h3>

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"

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

<ol start="3"><li>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)</li> </ol>

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.

来源:https://stackoverflow.com/questions/39436895/open-url-in-new-microsoft-edge-window

Recommend

  • Create HTTPS client in NodeJS
  • Why is Calendar returning the wrong hour with the correct time-zone?
  • Webpack suddenly broke
  • How to overlay a view in a constraintlayout?
  • Python - Implementing Custom exceptions
  • Can we implement some code that fires upon selecting something in google document?
  • How do I get old messages from RabbitMQ?
  • Could not find a storyboard named 'Main' in bundle NSBundle?
  • How to read a pdf file stored in sdcard using adobe reader installed in the android device?
  • Is there a way to continuously pipe data from Azure Blob into BigQuery?
  • Ctypes: fast way to convert a return pointer to an array or Python list
  • Lookup song by ISRC in Apple Music/iTunes
  • Loading data to neo4j from XML using py2neo
  • HTTPS request/response in Android
  • PostgreSQL in Docker - pg_hba.conf to allow access from host to container
  • How to run python3.7 based flask web api on azure
  • Problem with installing Charm-Crypto for Python3
  • Window-select multiple artists and drag them on canvas
  • Is there a way to convert all existing table data to UTF8 collation?
  • Alternative to bcrypt when saving passwords in PHP 5.2
  • in Gwt, there are 2 different packages (or 2 options) for doing drag n Drop? Which one is better?
  • Bulk loading into PostgreSQL from a remote client
  • Opening tel: links from UIWebView
  • MayAVI install on Python 3.6 [duplicate]
  • How to use array in autohotkey?
  • How to create subsets of a single set of elements with XSLT?
  • Ruby regex for matching simpliest Ruby's regexes
  • Google Spreadsheet Script to Blink a range of Cells
  • JavaScript Regex to Match Boundaries of Words with diacritics
  • Stacked bar chart with continuous time-axis as x-axis
  • Android: Unable to detect vertical plane
  • How do I add a mouse over tooltip to an Image using .DrawImage()
  • Debug `Unexpected end of JSON input Error` on content script
  • Google App Engine backend servlet not responding
  • Unity3d lost directional light shadows after generate assetBundle (.unity3d file)
  • Bad automatic Triangulation with Mayavi for coloring a surface known only by its corner
  • Using Service Component Runtime
  • How to mutate multiple variables without repeating codes?
  • How to handle a codeigniter PDF generator