Open the local desktop client program on the web page

To open the local desktop client program on the web page, you need to use the external protocol url, associate the url with the local application by writing the registry, and then click a hyperlink on a web page to start it. This method is very practical and simple;

Below is an example:

Windows Registry Editor Version 5.00 
[HKEY_CLASSES_ROOT\PLC]  
@="PLC"
"URL Protocol"="D:\\CHINS\\PLCPOWER\\WindowsFormsApp1.exe"  
[HKEY_CLASSES_ROOT\PLC\DefaultIcon]
@="D:\\CHINS\\PLCPOWER\\WindowsFormsApp1.exe,1" 
[HKEY_CLASSES_ROOT\PLC\shell]
@="open"
[HKEY_CLASSES_ROOT\PLC\shell\open]
@="open"
[HKEY_CLASSES_ROOT\PLC\shell\open\command]
@="\"D:\\CHINS\\PLCPOWER\\WindowsFormsApp1.exe\" \"%1\""

  1. Replace the path and protocol name in the above code, and then save it as a .reg file;
  2. Double-click the reg file to run;
  3. You can enter the protocol name in the file browser to test whether the registration is successful;

Enter PLC://

  1. code hyperlink jump in html

Guess you like

Origin blog.csdn.net/weixin_42551921/article/details/131053781