How to add a custom menu option to the right click menu in Windows 10 and have it execute a command/application.
- Navigate to
- Right click on
New -> Key.
- Enter a name for your new menu option.
- On this new key (folder in the UI) right click and select
New -> Key. Call this new key
- The default value should be the command you wish to execute when the menu option is clicked:
The following is how you would create a right click option run a file with NodeJS.
First create a file with the following contents:
1 2 node.exe %1 pause
%1is how we pass in the target file (the file that was right clicked on) as a parameter to our program.
Create the new right click menu (Run with NodeJS) in regedit and make it execute the above script: