0

我已创建 C# 应用程序以使用命令行开关在 IE 模式下启动 MSEDGE.exe。

        ProcessStartInfo processInfo = new ProcessStartInfo();
        processInfo.FileName = "msedge";                
        StringBuilder arguments = new StringBuilder();                
        arguments.Append(" --ie-mode-force");
        arguments.Append(" --internet-explorer-integration=iemode");
        arguments.Append(" --no-first-run");
        arguments.Append(" --no-service-autorun");
        arguments.Append(" --disable-sync");
        arguments.Append(" --test-type");              
        arguments.Append(" --disable-features=msImplicitSignin");
        arguments.Append(" --user-data-dir=" + getEdgeTempFolder());
        arguments.Append(" www.google.com");
        processInfo.Arguments = arguments.ToString();              
        Process process = new Process();
        process.StartInfo = processInfo;
        process.Start();

上面的代码将以 IE 模式启动 Microsoft Edge。但是当页面显示时,它还会在顶部显示信息栏,“此选项卡中的所有站点都将以 Internet Explorer 模式打开”。通过任何命令行开关启动时如何隐藏此信息栏?

这是以 IE 模式启动 Edge 的图像。 在此处输入图像描述

4

1 回答 1

0

As you are launching the MS Edge browser in the IE mode, it will display the information bar with the text "All sites in this tab will be opened in internet explorer mode" along with the IE browser logo beside the Address bar.

Based on my experience, there is no way to hide that information bar and IE logo.

If your C# application is accessing the site in the IE mode of the MS Edge browser then the users should know that they are seeing the site in the IE mode.

于 2021-12-27T13:48:29.077 回答