【Web】 通过浏览器打开本地应用程序
首先需要编写注册表:
以Steam为例:
"C:\Program Files (x86)\Steam\Steam.exe"
然后编写注册表:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\steam] @="" "URL Protocol"="C:\\Program Files (x86)\\Steam\\Steam.exe" [HKEY_CLASSES_ROOT\steam\DefaultIcon] @="C:\\Program Files (x86)\\Steam\\Steam.exe" [HKEY_CLASSES_ROOT\steam\Shell] [HKEY_CLASSES_ROOT\steam\Shell\Open] [HKEY_CLASSES_ROOT\steam\Shell\Open\Command] @="C:\\Program Files (x86)\\Steam\\Steam.exe"
保存,然后双击运行注册
然后编写一个页面:
<html> <head> </head> <body> <a href="steam://">打开Steam</a> </body> </html>
页面效果: