1:test.reg中写入
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\HelloWorld]
@="HelloWorld Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\HelloWorld\DefaultIcon]
@="C:\\Users\\xwy\\Desktop\\HelloWorldProtocal\\HelloWorld\\release\\HelloWorld.exe,1"
[HKEY_CLASSES_ROOT\HelloWorld\shell]
@=""
[HKEY_CLASSES_ROOT\HelloWorld\shell\open]
@=""
[HKEY_CLASSES_ROOT\HelloWorld\shell\open\command]
@="\"C:\\Users\\xwy\\Desktop\\HelloWorldProtocal\\HelloWorld\\release\\HelloWorld.exe\" \"%1\""
2:运行test.reg文件
3:通过访问helloworld://parameter/就可调起对应程序,parameter就是命令行参数