- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi url protocol 让浏览器运行本地的EXE程序
url protocol
让浏览器运行本地的EXE程序。例如:点击浏览器的一个下载链接,就会打开本地的迅雷。
1)注册表注册
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\yn]
"URL Protocol"="D:\\1.exe"
@="WebshellProtocol"
[HKEY_CLASSES_ROOT\yn\DefaultIcon]
@="D:\\1.exe,1"
[HKEY_CLASSES_ROOT\yn\shell]
[HKEY_CLASSES_ROOT\yn\shell\open]
[HKEY_CLASSES_ROOT\yn\shell\open\command]
@="\"D:\\1.exe\" \"%1\""
2)编辑HTML
3)DELPHI程序
procedure TForm16.FormCreate(Sender: TObject);
begin
label3.Caption:='传入的参数是:'+ParamStr(1); // yn:hello
end;
来源:https://www.cnblogs.com/hnxxcxg/p/11646013.html