很多時候,想通過IE瀏覽器枯途,或者支持Protocol Url的瀏覽器打開程序忌怎,可以如下配置。
1.添加自定義URL Protocol
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\TestProrotolUrl]
"URL Protocol"="D:\\Test\\TestProrotolUrl.exe"
@="TestProrotolUrl"
[HKEY_CLASSES_ROOT\TestProrotolUrl\shell]
[HKEY_CLASSES_ROOT\TestProrotolUrl\shell\open]
[HKEY_CLASSES_ROOT\TestProrotolUrl\shell\open\command]
@="\"D:\\Test\\TestProrotolUrl.exe\" \"%1\""
image.png
2.IE瀏覽器上輸入
TestProrotolUrl://
解析:該操作會執(zhí)行D:\Test\TestProrotolUrl.exe文件
3.傳參
TestProrotolUrl://test/ -testword
解析:該操作會執(zhí)行D:\Test\TestProrotolUrl.exe文件柔袁,同時傳入?yún)?shù)為 TestProrotolUrl://test/%20-testword