xgnote:// r:/2.txt --这种不会打开
xgnote:// r:\2.txt 后一段用\就能打开.
要实现浏览器访问本地程序,需要在注册表 HKEY_CLASSES_ROOT\ 位置建个协议目录,内容如下:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\xgnote]
"URL Protocol"="D:\\Program Files (x86)\\Notepad++\\notepad++.exe"
@="notepad++"
[HKEY_CLASSES_ROOT\xgnote\DefaultIcon]
@="D:\\Program Files (x86)\\Notepad++\\notepad++.exe,0"
[HKEY_CLASSES_ROOT\xgnote\Shell]
@=""
[HKEY_CLASSES_ROOT\xgnote\Shell\open]
@=""
[HKEY_CLASSES_ROOT\xgnote\Shell\open\command]
@="\"D:\\Program Files (x86)\\Notepad++\\notepad++.exe\" \"%1\""
注册目录名必须是 协议名!
注册表设置教程
本文介绍如何通过修改注册表创建自定义协议,使浏览器能直接调用本地程序,如Notepad++。具体步骤包括在HKEY_CLASSES_ROOT下建立相应目录及子键,并设置URLProtocol等属性。
1万+

被折叠的 条评论
为什么被折叠?



