很多时候,想通过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\""
![](https://img.haomeiwen.com/i6177207/ccb5bf7d5b1eaedb.png)
2.IE浏览器上输入
TestProrotolUrl://
解析:该操作会执行D:\Test\TestProrotolUrl.exe文件
3.传参
TestProrotolUrl://test/ -testword
解析:该操作会执行D:\Test\TestProrotolUrl.exe文件,同时传入参数为 TestProrotolUrl://test/%20-testword
网友评论