在新的 Microsoft Edge 窗口中打开 URL [英] Open URL in NEW Microsoft Edge window

查看:365
本文介绍了在新的 Microsoft Edge 窗口中打开 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个应用程序(使用 C#),它需要在指定的 Web 浏览器的新窗口中打开提供的 URL.我唯一遇到问题的浏览器是 Microsoft Edge.

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.

使用浏览器 exe 打开页面根本不起作用.浏览器窗口甚至不出现.

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?

推荐答案

我加入了这个程序的绝望用户行列.

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 文件 - 不行使用直接调用 microsoft-edge:"url" 或调用 3rd 方实用程序的结果都是一样的.仍然很好"地工作,但是一旦您想要多个站点,它就会添加另一个选项卡.

    @echo

    EdgeLaunch.exe "http://www.idnes.cz"

    EdgeLaunch.exe "http://www.seznam.cz"

    exit

来源:EdgeLaunch:http://www.edgemanage.emmet-gray.com/Articles/EdgeLaunch.htmlEdgeLauncher:https://github.com/MicrosoftEdge/edge-launcher

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

  1. Power shell 脚本警告:作为一项研究,我正在绕过执行的安全策略

    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force;

    Start-Process -FilePath "msedge" -ArgumentList "http://idnes.cz"
    Start-Process -FilePath "msedge" -ArgumentList "http://novinky.cz"

小花絮:如果您将 URL 留空,它将打开新窗口.一旦您添加了有效的网址...再次在选项卡中.

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

  1. HTML-Javascript - 认真的?!!!- 快工作了听起来很糟糕.它几乎可以正常工作,但是.此类弹出窗口通常受到限制.甚至当我 20 次允许来自本地 html 文件的 pupus 时.Edge 以某种方式忽略了每一个新的创业公司.(omfg)

但是,好的经典 HTML 结构,以及页面上的脚本:

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);

绝望的事实:它在第二次手动尝试时打开窗口.但.一旦你设置了status=yes"属性.它将再次成为 TAB.

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

这就是我从互联网上得到的.没有人可以通过一些网页简单地打开 2 个该死的窗口.

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

这篇关于在新的 Microsoft Edge 窗口中打开 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆