windowsprotocolsprotocol-handler

How do I create my own URL protocol? (e.g. so://...)


I have seen:

What is that first section where you see http and the like called?

Can I register my own?


Solution

  • The portion with the HTTP://,FTP://, etc are called URI Schemes

    You can register your own through the registry.

    HKEY_CLASSES_ROOT/
      your-protocol-name/
        (Default)    "URL:your-protocol-name Protocol"
        URL Protocol ""
        shell/
          open/
            command/
              (Default) PathToExecutable
    

    Sources: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml, http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx