通过特定的URI打开程序

通过特定的URI打开程序

.reg文件

Windows Registry Editor Version 5.00  

[HKEY_CLASSES_ROOTTest]  
"URL Protocol" = ""  
@="URL:Test Protocol"  

[HKEY_CLASSES_ROOTTestDefaultIcon]  
@="xx.exe,1"  

[HKEY_CLASSES_ROOTTestshell]  
  
[HKEY_CLASSES_ROOTTestshellopen]  
  
[HKEY_CLASSES_ROOTTestshellopencommand]  
@=""x:\xx.exe" "%1"" 

使用如上注册表进行注册就可以通过在浏览器输入Test://parameter来打开xx.exe了

参考链接:

1. Registering an Application to a URI Scheme

2. 从网页上打开本地应用程序——Windows下 URI Scheme的使用

原文地址:https://www.cnblogs.com/2018shawn/p/15427658.html