Creating Custom Protocol (Windows 7)

前端 未结 2 1421
猫巷女王i
猫巷女王i 2020-12-31 21:02

I\'ve been trying to create a custom protocol (open_php_file://) to open local files through the browser. I\'ve created the following registery-keys:

HKEY_CL         


        
2条回答
  •  耶瑟儿~
    2020-12-31 21:36

    Windows always replaces %1 with the full URI that was entered. AFAIK there is no way to change that behavior.

    This leaves you two options:

    1. If you've written the program being called yourself, you can filter the URI when it is being invoked.
    2. You could use an intermediate program that acts as a filter for the URI and then forwards the result to the actual protocol implementation. Fortunately for you, someone has already done exactly that. See 'CustomURL' on CodePlex. CustomURL is a small utility for registering custom URL protocols. For example you can associate the rdp:// protocol with Remote Desktop Client or the ssh:// protocol with Putty or another SSH client.

提交回复
热议问题