Windows Custom Right Click Menu Option
How to add a custom menu option to the right click menu in Windows 10 and have it execute a command/application.
Steps
- Open
regedit.msc
. - Navigate to
HKEY_CLASSES_ROOT\*\shell
. - Right click on
shell
and selectNew -> 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 keycommand
- The default value should be the command you wish to execute when the menu option is clicked:
Example
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
%1
is 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:
This post is licensed under CC BY 4.0 by the author.