Home > Net >  launch a Windows application from a web browser
launch a Windows application from a web browser

Time:09-05

I'm trying to launch a Windows application from a web browser, just like the VMWare console (VMRC) from a vCenter web interface, or the Zoom binary from a simple html link.

I understand Java applets, NAPI protocol and ActiveX are considered deprecated, so what is the best method please?

Thanks.

CodePudding user response:

Register as a protocol handler in the registry.

To handle foo://something URLs for example, the .reg file would look something like

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\foo]
"URL Protocol"=""
[HKEY_CLASSES_ROOT\foo\shell\open\command] 
@="\"C:\\Program Files\\MyApp\\MyApp.exe\" \"%1\""

If your app is not already installed on the system you might want to look at ClickOnce instead.

  • Related