Cannot get Edge to work with --ie-mode-file-url command line flag

Richard Burdett 1 Reputation point
2021-02-27T18:37:34.343+00:00

We use an instrument test system which uses ActiveX controls to support hardware communication with the UUT and other test instruments via serial, USB, and GPIB, all operated via Javascript code on HTML pages which are saved on the filesystem of the PC running the tests. The ActiveX controls mean we have to use IE but I am trying to get Edge to load these pages in an IE tab.

I have successfully set up a group policy which means the external websites I list in a sitelist.xml file will automatically load in IE mode, but this does not work for URLs which start file:///

I thought I might be able to force the load via a shortcut of the format:
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --new-window --ie-mode-file-url "C:\TestSoftwareSuite\index.htm"
but this does not work. It does open a new Edge window (so the flag --new-window works) and the page loads, but in nornal Edge mode. The flag --ie-mode-file-url, which is referenced in https://learn.microsoft.com/en-us/deployedge/edge-ie-mode-add-guidance-filetype-associations (althought there are only three Googe results fo a search for "--ie-mode-file-url"!), does not apear do do anything.

I have also tried it with with external site as follows:
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --new-window --ie-mode-file-url "bbc.co.uk"
and again it is niot working.

Is there actually any support for --ie-mode-file-url in Edge?

I am using Edge 88.0.705.81 (Official build) (64-bit)

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,114 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Deepak-MSFT 2,191 Reputation points Microsoft Vendor
    2021-03-01T02:37:18.033+00:00

    @Richard Burdett ,
    From your above-mentioned description, I understand that you want to launch the locally stored HTML files(file://) using the IE mode in the Edge browser.
    I try to test the said issue on my side with the Microsoft Edge Version 88.0.705.81.

    If you are using the older group policy templates for the Edge browser then I suggest you download the latest group policy templates from here.

    The latest Edge browser group policy template contains Allow launching of local files in Internet Explorer mode policy.

    This policy controls the availability of the --ie-mode-file-url command line argument which is used to launch Microsoft Edge with a local file specified on the command line into Internet Explorer mode.

    If you set this policy to true, or don't configure it, the user is allowed to use the --ie-mode-file-url command-line argument for launching local files in Internet Explorer mode.

    If you set this policy to false, the user isn't allowed to use the --ie-mode-file-url command-line argument for launching local files in Internet Explorer mode.

    Then you can set the command line value like below.

    "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --new-window --ie-mode-file-url "HTML_file_path_here..."

    After enabling the Allow launching of local files in Internet Explorer mode policy, try to launch the command prompt window as an Administrator and run the gpupdate command.

    Then after launch the Edge browser and paste edge://policy/ in the address bar and press the Enter key. Make sure that the policy you just enabled is updated here.

    After that, you can try to launch the Edge browser shortcut that contains the command line. It should launch the local file in the IE mode in the Edge browser.

    Test result:

    72790-222.gif

    ----------

    If the response is helpful, please click "Accept Answer" and upvote it.
    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. Richard Burdett 1 Reputation point
    2021-03-02T20:48:24.983+00:00

    Deepak,

    Thank you for the response - and apologies for my delay in replying. You appear to have done exactly what I have tried but in yuour case it works as expected.

    I am using Edge version 88.0.705.81 as you list; rest is as below:

    Microsoft Edge 88.0.705.81 (Official build) (64-bit)
    Revision 324d415ccf2f0dac8fa87e00b3e07b69f8d3d9e6
    Operating system Windows 10 OS Version 2004 (Build 19041.804)
    JavaScript V8 8.8.278.17
    User agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36 Edg/88.0.705.81
    Command-line "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --new-window --ie-mode-file-url --flag-switches-begin --flag-switches-end "C:\TestSoftwareSuite\index.htm"
    Executable path C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe

    I downloaded the current policy templates and set the policies to:

    73521-image.png

    However it still does not work.

    The command line I am calling to load Edge is:
    "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --new-window --ie-mode-file-url "C:\TestSoftwareSuite\index.htm"

    Hence I'm not sure why the line listed on the version page includes the --flag-switches-begin --flag-switches-end as in:
    "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --new-window --ie-mode-file-url --flag-switches-begin --flag-switches-end "C:\TestSoftwareSuite\index.htm"

    In your test what was the exact format of the "HTML_file_path_here..." URL?