美文网首页工作生活
自定义的 Protocol Url

自定义的 Protocol Url

作者: 米来MiLai | 来源:发表于2019-07-01 10:37 被阅读0次

    很多时候,想通过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

    相关文章

      网友评论

        本文标题:自定义的 Protocol Url

        本文链接:https://www.haomeiwen.com/subject/oygwcctx.html