I did google couple of tutorials on google.
I am able to add right-click menu item to a FOLDER by doing this:
[HKEY_CLASSES_ROOT\Directory\shell\Command]
@="TestRightClick:"
[HKEY_CLASSES_ROOT\Directory\shell\Command\Command]
@="myExecutable.exe %L"
I need to add this to a FILE as well.
1) Where do I add it in the registry?
2) And how do I pass parameters to my executable in case if I am selecting multiple files?
How to pass in multiple file/folder paths via a rigth-click event(verb) to an executable?
Edit Right Click Menu for Desktop You can also add any application to the desktop right-click menu pretty easily. Just right-click on the shell key and choose New – Key. Name the key whatever you want as that will appear in the context menu.
Right-click on the new Notepad key, and then choose New Key from the menu. Give this key the name “command” in lowercase. To complete this step you'll need the full path to the application that you want to launch. You can use Shift + Right-Click to get the Copy as Path menu item to find this more quickly.
Press the "Win + R" keys to open the Run dialog. Type 'regedit' and click "Ok" and then approve the changes by clicking "Yes" on the UAC prompt that follows. Navigate to "HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers" and click the arrow to expand.
You can do it with my program singleinstance. No shell extensions involved.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\SystemFileAssociations\.txt\Shell\p4merge]
"MultiSelectModel"="Player"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.txt\Shell\p4merge\Command]
@="\"d:\\singleinstance.exe\" %1 \"C:\\Program Files\\Perforce\\p4merge.exe\" $files --si-timeout 400"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With