To add a folder you access often to the context menu, select Folder in the Item type to add box. In the Program to add box, click Choose Folder. NOTE: You can also add files to the context menu. If you choose to add Any type of file, the Choose Folder button becomes the Search button.
You can add favorites to your QAP menu with the Windows Explorer context menus. Right-click or Shift+Right-click on any file or folder to show its context menu. QAP's command in this menu are recognizable by the QAP icon on the left. You can also right-click the Desktop background to show the QAP popup menu!
Right-click the newly created key, select the New menu and select the Key option. Name the key InprocServer32 and press Enter. Double-click the newly created key and set its value to blank to enable the classic context menu on Windows 11. Click the OK button.
In the registration editor (regedit.exe
) find:
HKEY_CLASSES_ROOT\Directory\Background\shell
if you are administratorHKEY_CURRENT_USER\Software\Classes\directory\Background\shell
if you are a normal userHKEY_CLASSES_ROOT\Directory\shell
if you are administratorHKEY_CURRENT_USER\Software\Classes\directory\shell
if you are a normal userHKEY_CLASSES_ROOT\*\shell
if you are administratorHKEY_CURRENT_USER\Software\Classes\*\shell
if you are a normal userIn all cases:
shell
, naming it as you want to name the
context menu itemcommand
(mandatory name)default
property in command
to
myprogrampath\path\path\executable.exe "%1"
to pass the file path and
name of the selected file to your custom program (for .../Directory/Background
and .../directory/Background
cases use %V
instead of %1
)More customization:
icon
for key created at step 1 with value matching an icon resource path. You can also provide an integer arguments to specify which icon to use. Example: %SystemRoot%\System32\shell32.dll,3
Extended
for key created at step 1Position
with one of: Top
, Bottom
Found a cleaner, easier and faster solution: create a text file, fill it with these contents, update it to your needs, save with .reg suffix and launch it (it does not need administrator priviliges because it accesses user-part of the registry):
Windows Registry Editor Version 5.00
; Setup context menu item for click on right panel:
[HKEY_CURRENT_USER\Software\Classes\directory\Background\shell\MenuItemNameBackground\command]
@="C:\\yourpath\\executable.exe \"%1\""
; Optional: specify an icon for the item:
; HKEY_CURRENT_USER\Software\Classes\directory\Background\shell\MenuItemNameBackground]
;"icon"="C:\\yourpath\\appicon.ico"
; Optional: specify a position in the menu
; HKEY_CURRENT_USER\Software\Classes\directory\Background\shell\MenuItemNameBackground]
;"position"="Bottom"
; -------------------------------------------------------------------------------------
; Setup context menu item for click on folders tree item:
[HKEY_CURRENT_USER\Software\Classes\directory\shell\MenuItemNamePanel\command]
@="C:\\yourpath\\executable.exe \"%1\""
; Optional: specify an icon for the item:
; [HKEY_CURRENT_USER\Software\Classes\directory\shell\MenuItemNamePanel]
;"icon"="C:\\yourpath\\appicon.ico"
; Optional: specify a position in the menu
; [HKEY_CURRENT_USER\Software\Classes\directory\shell\MenuItemNamePanel]
;"position"="Top"
In this way you can also have a backup of your configuration: just save the .reg file in a safe place. If you manually edit the registry after launching the file, right-click and slect "export".
Beware of double backspaces in path: \\
I went back and also answered this in another topic since there doesn't appear to be much on this question specifically.
I found the simplest way was to add a String Value to the key called "AppliesTo" and set its value to "under:{path}"
In my example, I want it to only look in the T Drive, so my String value is "AppliesTo":"under:T:".
In C#, this is easily accomplished with the following:
RegistryKey _key = Registry.ClassesRoot.OpenSubKey("Folder\\Shell", true);
RegistryKey newkey = _key.CreateSubKey("My Menu Item");
newkey.SetValue("AppliesTo", "under:T:");
RegistryKey subNewkey = newkey.CreateSubKey("Command");
subNewkey.SetValue("", "C:\\yourApplication.exe");
subNewkey.Close();
newkey.Close();
_key.Close();
The only good solution I found a really working is : https://superuser.com/questions/1097054/shell-context-menu-registry-extension-doesnt-work-when-default-program-is-other
Add keys in HKEY_CLASSES_ROOT\SystemFileAssociations\your.extension\shell\command Modify the last key with the command you wanna do.
For my purpose it was :
"C:\Program Files (x86)\GPSBabel\gpsbabel.exe" -r -i gpx -f "%1" -x simplify,count=1000 -o gpx -F "%1.gpx"
If I export the it I get a .reg :
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\SystemFileAssociations\.gpx\shell\Simplify gpx\command]
@="\"C:\\Program Files (x86)\\GPSBabel\\gpsbabel.exe\" -r -i gpx -f \"%1\" -x simplify,count=1000 -o gpx -F \"%1.gpx\""
Open command prompt [run as administrator] and execute this command
reg add "HKEY_CLASSES_ROOT\Directory\shell\Refi2\command" /d "powershell.exe -noexit -command Set-Location -literalPath '%V'"
For more details about more features run:-
reg add /?
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