This article explains how to add a program to the right-click context menu in Windows Explorer. This can be very helpful if you commonly use a certain program to open files. I use notepad a lot to edit files and so it saves me a lot of time to add this to the windows explorer context menu. Then all I have to do is right-click the file and select “Edit with Notepad”. Please note, unless otherwise specified all items in quotes should be entered without the quotes.
- Open registry editor.
- Click Start or Start -> Run, depending on your version of Windows.
- Type Regedit in the Open textbox.
- Press Enter or click OK.
- Perform a registry backup (instructions for Windows 7, Vista & XP).
- Navigate to HKEY_CLASSES_ROOT\*\shell
- Right-click on the shell key and select New -> Key.
- Enter whatever name you want for this key (e.g. “notepad“).
- Double-click the “(Default)” item in the right pane of the new key you just created.
- Enter whatever prompt you want for this context menu item in the Value data textbox (e.g. “Edit in Notepad“).
- Right-click the new key created in step 3 & 4 and select New -> Key.
- Enter “command” in the Value data textbox.
- Double-click the “(Default)” item in the right pane.
- Enter the path to the program you want to run in the Value data textbox (e.g. “c:\windows\notepad.exe” “%1”).
- The %1 is the variable that will be populated with the path to the file you right-clicked.
- Make sure to include the quotes.
The moment you create these two new keys, the item will appear when you right-click a file. To test, right-click a file on your desktop and select your new command. It should open the program with the file that you right-clicked open in that program. If this does not work, review the steps above. If it still does not work, your application might not support passing in files on the command line.