how to hide "All sites in this tab will be opened in internet explorer mode" in Edge with IE Mode?

Hasmukh Ginoya 1 Reputation point
2021-12-25T11:21:39.243+00:00

Hi
I have create C# application to to launch MSEDGE.exe in IE mode using command line switch.
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();

The above code will launch Micorosoft Edge with IE mode. but when the page is displayed it will also display information bar on the top with "All sites in this tab will be opened in internet explorer mode".
How can i hide this information bar when it launch through any command line switch ?

this is the image of launching Edge with IE mode.
160434-image.png

Microsoft Edge | Microsoft Edge development
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2021-12-27T06:46:19.127+00:00

    Hi @Hasmukh Ginoya ,

    After some tests and related searches, I think this banner cannot be completely hidden. Even if you close it manually, it will reappear in your newly opened tab. I think this is by design.

    On the other hand, using the --ie-mode-force command will make Edge always run in IE mode (even if a new Edge process is manually opened). I suggest that you can configure IE mode policies for the websites you need. Just refer to this doc: Configure IE mode policies.

    Best regards,
    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Hasmukh Ginoya 1 Reputation point
    2021-12-27T07:41:53.227+00:00

    Hi XuDong Peng-MSFT
    Thanks for replay,
    due to that top banner IE window that is hosted inside the Microsoft edge window, is shifted in vertical down side. So In Legacy automation i can not able to find window control by location.
    So that's why i require to hide that banner through programming so end user no need to worry about that and my purpose will also resolve.

    it is highly appreciate if you would suggest more on that


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.