We register custom protocol handler for our application.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\testapp]
@="URL: TestApp Protocol"
"URL Protocol"=""
[HKEY_CURRENT_USER\SOFTWARE\Classes\testapp\shell]
[HKEY_CURRENT_USER\SOFTWARE\Classes\testapp\shell\open]
[HKEY_CURRENT_USER\SOFTWARE\Classes\testapp\shell\open\command]
@="\"wscript\" \"C:\\Users\\user1\\AppData\\Local\\Programs\\TestService\\CustomTestProtocolHandler.vbs\" \"%1\""
Both Chrome and Explorer can start this custom protocol handler.
But it does not work from MS Edge.
Should I perform some additional configuration to enable custom protocol in Edge?
Or custom protocol handler will not work from MS Edge at all?
UPDATE:
It works for me if I use "EditFlags"=dword:00210000 value:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\testapp]
@="URL: TestApp Protocol"
"EditFlags"=dword:00210000
"URL Protocol"=""
[HKEY_CURRENT_USER\SOFTWARE\Classes\testapp\shell]
[HKEY_CURRENT_USER\SOFTWARE\Classes\testapp\shell\open]
[HKEY_CURRENT_USER\SOFTWARE\Classes\testapp\shell\open\command]
@="\"wscript\" \"C:\\Users\\user1\\AppData\\Local\\Programs\\TestService\\CustomTestProtocolHandler.vbs\" \"%1\""
FTA_OpenIsSafe - 0x00010000
FTA_SafeForElevation - 0x00200000
https://msdn.microsoft.com/en-us/library/windows/desktop/bb762506(v=vs.85).aspx
Beginning with Microsoft Edge 96, web apps can now use Protocol Handlers in Microsoft Edge. This is a powerful feature that allows your installed web application (or PWA) to handle pre-set or custom protocols.
- LS. Method of allowing a webpage to handle a given protocol using navigator. registerProtocolHandler . This allows certain URLs to be opened by a given web application, for example mailto: addresses can be opened by a webmail client.
The only way I found to make it work in MS Edge was to point the open command to an intermediate bat file. My registry entry look like this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\magnet]
@="URL:Magnet Protocol"
"URL Protocol"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\magnet\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\magnet\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\magnet\shell\open\command]
@="\"D:\\Program Files\\PowerShell Scripts\\HandleMagnetTransmission.bat\" \"%1\""
I don't know why MS Edge refuses to call any executable file directly as a protocol handler. I tried notepad.exe for example, but it didn't work either.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With