Forum Discussion
How the new Edge will handle file:// URI ?
JeffOwens +1 ! This is what we have done finally. We just had to implement a new URI Scheme handler to mimic what we had in IE11. It works with all modern browsers.
If anybody want directions, please tell me. (Note: I'm the guy who posted the initial subject - I'm working for another company now).
Best regards JeffOwens.
sylvainrodrigue Would you be able to share the instructions? Thanks!
- aspeagle69Sep 30, 2021Copper ContributorThank 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!
- narutardsMay 05, 2020Iron Contributor
Since noone has answered any of the requests for the alternative protocols yet, let me dig up something I wrote back in 2016 as a POC at work:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\rdp] @="URL:RDP Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOT\rdp\shell] [HKEY_CLASSES_ROOT\rdp\shell\open] [HKEY_CLASSES_ROOT\rdp\shell\open\command] @="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -Command \"$val='%1'; $val = $val.TrimStart('rdp://').TrimEnd('/'); & 'C:\\Windows\\system32\\mstsc.exe' /v:\"$val\"\""Save this is a .reg file and execute it.
<html> <body> <a href="rdp://PC012345">RDP</a> </body> </html>And this as a .html file somewhere.
Clicking the rdp:// link should now open mstsc.exe with the host "PC012345" pre-selected.
The powershell bit is "needed" (afaik) because %1 contains the entire link with an additional trailing slash, so "rdp://PC012345/".
I'm sure you guys can figure out the rest and how to apply this for other programs.
- rakova17May 05, 2020Copper ContributorThanks, that's pretty interesting. Our problem though is that most of our links are in places that won't support a link prefix like that (SharePoint, for example).
- jpochedleyMay 04, 2020Brass Contributor
I know it may not be what 100% of people want / need, but this helped us since most of the items we were linking to were Office docs (not file folders, etc)...
Check out the Office URI scheme, as documented here:
https://docs.microsoft.com/en-us/office/client-developer/office-uri-schemes
When using the Office URI, the file open method uses the Office protocol handlers which support the file:// URI .... so, a HREF on a web page can point to ms-word:ofv|u|file://<server_path_to_doc> and Word will open the file directly from a non-http path...
HTH