Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add new items to right-click event on Folders and Files in Windows?

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?

Related:

How to pass in multiple file/folder paths via a rigth-click event(verb) to an executable?

like image 607
Chicago Avatar asked Nov 30 '09 18:11

Chicago


People also ask

How do I add something to my right-click menu?

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.

How do I add programs to the right-click menu in Windows 10?

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.

How do I change right click Settings in Windows 10?

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.


1 Answers

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"
like image 138
zenden2k Avatar answered Sep 30 '22 02:09

zenden2k