js js vue项目打开本地exe程序

参考:

https://devpress.csdn.net/gitcode/6401d485986c660f3cf9114d.html

web端唤醒本地应用并检测是否唤醒成功:https://juejin.cn/post/6903305494681780232

使用JS检测自定义协议是否存在:https://www.cnblogs.com/tangjiao/p/9646855.html

 

参考weixin:

weixin.reg:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\weixin]
@="weixinProtocol"
"URL Protocol"="weixinProtocol"

[HKEY_CLASSES_ROOT\weixin\DefaultIcon]
@="D:\\software\\wechat\\WeChat.exe,1"

[HKEY_CLASSES_ROOT\weixin\shell]

[HKEY_CLASSES_ROOT\weixin\shell\open]

[HKEY_CLASSES_ROOT\weixin\shell\open\command]
@="\"D:\\software\\wechat\\WeChat.exe\" \"%1\""

双击该文件即可直接导入到注册表中

调用协议很简单,就是一个链接即可,如下所示:

<a href="weixin://">WeiXin</a>

或者在浏览器地址栏输入:weixin://

posted @ 2023-07-09 15:16  haha-uu  阅读(1299)  评论(4编辑  收藏  举报