How the new Edge will handle file:// URI ?

Brass Contributor

file: links seems to be ignored in this version of Edge (like they are in Chrome). In the previous version of Edge however (and all IE versions), clicking on a file: link opens the original document.

 

This is why by the way we are still using IE / Edge at my office. A lot of important intranet applications allow users to upload document and modify them later. Using Chrome, the document has to be downloaded locally before editing, and then re-uploaded after editing. With IE/Edge, the original document opens in Word/Excel/Acrobat in edit mode. The user just have to press CTRL+S to save it. 

 

I really hope Edge will keep this behavior.

80 Replies
Marty, I tried this. It's succeeding in opening explorer.exe but the file itself is not being opened. What does %1 hold when assigned to $val? Is it the entire URL? If yes, shouldn't the substring only exclude the first 7 characters ("myfile:")? Thank you!

@sylvainrodrigue 

I find the following works to open a folder from an Edge favorite

file:///C:/Users/tallen/OneDrive%20-%20Danaher/Documents/ePeak

 

You can simply drag a folder from File Explorer to the Edge address bar to get this link.

 

Edge 92.0.902.67

The folder content is displayed as bare HTML links which download the file and provide an Open link.  Yeah, not editing the original files. But there is also a well-formatted file path you can copy and paste into File Explorer, so it is still handy as a bookmark to find local folders.

 

tca09_0-1629251302418.png

 

It has always been possible for the user to navigate to a file:// folder using the omnibox/addressbar or a favorite. The topic at hand is the restriction that blocks navigation to a file:// URL from a http/https URL, as discussed in https://textslashplain.com/2019/10/09/navigating-to-file-urls/

@Mr_TJ Seems like that timeframe has come and gone. Any updates from Microsoft on a real fix for file:// links for intranet?

@PeteWilson: Support for "View in File Explorer" is on the roadmap for Oct release: https://www.microsoft.com/en-us/microsoft-365/roadmap?filters=&searchterms=file%2Cexplorer

Also, keep an eye on the Edge Policies page when it is updated for Edge 94: https://docs.microsoft.com/en-us/deployedge/microsoft-edge-policies
Thank you! This was the perfect answer for most of our documents. I still haven't found a way to display the pdf docs though. I may just have those uploaded since they are view-only. Thanks again!
Can you be more specific? I see nothing useful for helping my Intranet Wiki support file:// links in the Edge Policies, and Sharepoint is really not a solution. Since the context menu Open in IE doesn't seem to be working for me, basically I am stuck using IE mode for Intranet (I need javacsript: links) and Wiki. (PS It would really be nice if Edge added protocol for opening a URL in Edge private mode like the microsoft-edge: protocol.)

@Mr_TJ 

Hello all

You should have a look at this brand new Version 95 policy:

IntranetFileLinksEnabled

Allow intranet zone file URL links from Microsoft Edge to open in Windows File Explorer

https://docs.microsoft.com/en-us/deployedge/microsoft-edge-policies#intranetfilelinksenabled

 

Edge Beta release notes

https://docs.microsoft.com/en-us/deployedge/microsoft-edge-relnote-beta-channel

Version 95.0.1020.9: September 28

Feature updates

Intranet zone file URL links will open in Windows File Explorer. You can allow file URL links to intranet zone files originating from intranet zone HTTPS websites to open Windows File Explorer for that file or directory. You can enable this experience using the IntranetFileLinksEnabled policy.

 

Release schedule

https://docs.microsoft.com/en-us/deployedge/microsoft-edge-release-schedule

Stable Version 95 is announced in Week of 21. Oct 2021.

 

Hi Jeff, what keys did you have to set for the protocol handler? Do yuo have any examples of all the keys you had to set to make this work.

@Rheinrich21 - https://techcommunity.microsoft.com/t5/discussions/how-the-new-edge-will-handle-file-uri/m-p/2182012... has a full implementation of an Application Protocol Handler. Basically, you just need the URL Protocol subkey and a Shell\Open\Command value.

 

But to reiterate the earlier point, you have to very carefully consider the security implications of this approach.

We have enabled this GPO Policy, However the links open in the same Edge Tab as the application. when adding the code to open in a new tab it seems to ignore this open in new tab code. Has anyone else had this issue with the intranet file opening in the same tab instead of a new tab?

@apatel0708 ... are you presenting the URI and an HTML link?  If so, be sure to specify the "target" attribute of the link and a "_blank" value for the attribute.  This will open in a new explorer window and then the link extension will process whatever application handler exists for the file being linked.

here is an example from our codebase stripping CSS:
<a target="_blank" href="file://xxxx/xxx.pdf"> View Document </a>

 

in IE11 mode this opens in a new tab as expected. In non-IE mode, this opens in the same tab instance after enabling the IntranetFileLinksEnabled policy.

@Eric_Lawrence  we created our own file protocol handler and it worked great. In the code we accounted for security. Thank you for the suggestion. 

I have actually started incorporating the addin "ietabhelper" into my browser installations. This has proved to be very effective.
No matter how we do it, IE automatically switches to Edge within 2 seconds of opening. Using IETAB helper has done the trick nicely and lessons the confusion of my users, many of whom, no matter how well educated, cannot seem to tell the difference between Internet Explorer and Edge....
We were using Chrome prior to finding out that IE would be deprecated. I believe IETab Extension required licensing, so we migrated the company to Edge and enabled IE Mode with an Enterprise Mode Sitelist that tells the URL what document and compatability mode to open in. It was pretty easy implementation.

No longer requires such as far as I am aware, and it works with all the browsers my users like to use. Also, with Windows 11, IE mode is useless, as far as I am concerned. I never liked it. Considered it akin to using a Lamborgini in "Ford Mode"...

@Kaseebhotla Yes, it is the entire URL.  My custom protocol name is 7 characters, and I'm also stripping off the "://" characters.  The remainder of the URL is the UNC path to the file.

You have a typo. Your custom protocol "MyFile" is 6 characters.

I believe your original solution should have the last line as follows:
@="powershell.exe -Command \"$val='%1'; $val = $val.Substring(7, $val.length - 7).TrimEnd('/').Replace('/','\\'); & 'EXPLORER.EXE' $val\""