admin管理员组文章数量:1566854
chrome网页中打开exe
Windows Registry Editor Version 5.00
编辑文本:
[HKEY_CLASSES_ROOT\VMS]
@="URL:VMS"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\VMS\DefaultIcon]
@="chrome.exe,1"
[HKEY_CLASSES_ROOT\VMS\shell]
[HKEY_CLASSES_ROOT\VMS\shell\open]
[HKEY_CLASSES_ROOT\VMS\shell\open\command]
@="E:\\Debug\\CameraPlayer.exe %1"
以上内容另存为WebCall.reg,替换最后一行为实际要打开的exe文件全路径 最后的%1代表参数
双击导入注册表
网页中加入
<a href="VMS://uuid,admin,张三"> vms </a>
浏览网页 点击超链接即可打开exe
程序中接受传递的值
Main函数中
MessageBox.Show(e.Args.Length + "|" );
if (e.Args.Length > 0)
{
string arg = e.Args[0];
string para = arg.Substring(arg.IndexOf(":")+1, arg.Length- arg.IndexOf(":") -1);
string[] params= para.Split(',');
}
参考1:https://blog.csdn/mr_wanter/article/details/52784958
它的教程存在问题:缺少:
[HKEY_CLASSES_ROOT\VMS]
@="URL:VMS"
"URL Protocol"=""
版权声明:本文标题:chrome浏览器启用本地exe程序 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1727568269a1121241.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论