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"html
以上內容另存爲WebCall.reg,替換最後一行爲實際要打開的exe文件全路徑 最後的%1表明參數chrome
雙擊導入註冊表shell
網頁中加入函數
<a href="VMS://uuid,admin,張三"> vms </a>ui
瀏覽網頁 點擊超連接便可打開exespa
程序中接受傳遞的值htm
Main函數中blog
MessageBox.Show(e.Args.Length + "|" );get
if (e.Args.Length > 0)
{
string arg = e.Args[0];string
string para = arg.Substring(arg.IndexOf(":")+1, arg.Length- arg.IndexOf(":") -1);
string[] params= para.Split(',');
}