工作生活

自定义的 Protocol Url

2019-07-01  本文已影响0人  米来MiLai

很多时候,想通过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://
解析:该操作会执行D:\Test\TestProrotolUrl.exe文件

3.传参
TestProrotolUrl://test/ -testword
解析:该操作会执行D:\Test\TestProrotolUrl.exe文件,同时传入参数为 TestProrotolUrl://test/%20-testword

上一篇 下一篇

猜你喜欢

热点阅读