DEV Community

artydev
artydev

Posted on

Run a local application from the browser

Sometimes you can find handy to launch a local exe within the browser.
Here is the way to do it :

Custom Protocol Handling

Here is for example how la launch notepad in the browser

reg add HKEY_CLASSES_ROOT\my-prot /t REG_SZ /d "My Description" /f
reg add HKEY_CLASSES_ROOT\my-prot /v "URL Protocol" /t REG_SZ /d "" /f
reg add HKEY_CLASSES_ROOT\my-prot\shell /f
reg add HKEY_CLASSES_ROOT\my-prot\shell\open /f
reg add HKEY_CLASSES_ROOT\my-prot\shell\open\command /t REG_SZ /d c:\Windows\notepad.exe /f

Enter fullscreen mode Exit fullscreen mode

Run my-prot:// and launch Notepad

Top comments (0)