windows-10microsoft-edgeprotocol-handler

Custom protocol handler does not work in MS Edge


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


Solution

  • 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.