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\""
註冊目錄名必須是 協議名!