Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么windows将包含协议的完整自定义url传递给处理应用程序?_Windows_Registry_Protocols - Fatal编程技术网

为什么windows将包含协议的完整自定义url传递给处理应用程序?

为什么windows将包含协议的完整自定义url传递给处理应用程序?,windows,registry,protocols,Windows,Registry,Protocols,我正在尝试创建自己的URL协议,以从内部CRM中的URL初始化自定义应用程序 我已创建了以下注册表项: REGEDIT4 [HKEY_CLASSES_ROOT\smon1] @="URL:smon Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOT\smon1\shell] [HKEY_CLASSES_ROOT\smon1\shell\open] [HKEY_CLASSES_ROOT\smon1\shell\open\command] @="\"

我正在尝试创建自己的URL协议,以从内部CRM中的URL初始化自定义应用程序

我已创建了以下注册表项:

REGEDIT4

[HKEY_CLASSES_ROOT\smon1]
@="URL:smon Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\smon1\shell]

[HKEY_CLASSES_ROOT\smon1\shell\open]

[HKEY_CLASSES_ROOT\smon1\shell\open\command]
@="\"C:\\smon.exe\" \"%1\"" 
我的网站上有以下链接:

<a href='smon:1955'>1955</a>

我希望这会将变量1955传递给应用程序c:\smon.exe。 然而,它正在传递整个变量“smon:1955”

为什么它要传递所有信息而不是变量


我在这里遗漏了什么?

你没有遗漏任何东西,这就是处理程序的工作方式;整个URI在命令行中传递。检测并解析它

其基本原理可能是,它允许多个协议与同一可执行文件相关联,而无需在命令键中提供自定义的区分开关。

举个例子

这将传递到浏览器,并在url栏中显示为