html click and run notepad.exe in client computer with JavaScript *** SOLVED ***

Previous tag: How to run local program (exe) via Chrome via HTML/javascript suggested using registry for an alert protocol but the main program in Microsoft document is in c#. My question is with JavaScript, How to call to run the notepad.exe ( or Alert.exe ) in Chrome.

With luck, I figured it out.

To add your protocol following these instructions:

  1. Windows --> Right Click --> run ,
  2. Type regedit and click Enter.
  3. Search for HKEY_CLASSES_ROOT directory ( which is at top ).
  4. Add key name 'notepad' for the directory name (no quotes) as you protocol name in HKEY_CLASSES_ROOT. (this is the protocol name later be used)
  5. At anonymous (/ default) entry typed REG_SZ, input "URL:Notepad Protocol " (no quotes)as title of your applications. (It will be shown in any popup of the browser, should be user friendly)
  6. Add an entry named 'URL Protocol' typed REG_SZ without any value.
  7. Add key ( named shell in you new protocol directory
  8. Add directory named open under the shell directory above
  9. Add another directory named command in the open directory above.
  10. Add an anonymous entry typed REG_SZ with the path of your application executable, which is "c:\windows\notepad.exe" without quotes in the input.
  11. Exit regedit.


Now you can open your browser and run notepad:// and notepad will immediately be executed.


Read more here:

Content Attribution

This content was originally published by TLCW at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: