8

(This is not a duplicate - I have checked before asking)

Both .reg commands add a custom item entry to a folder context menu:

1. Context menu to folders:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\my custom command]
@="My command name"
"AppliesTo"="C:\\My specific Folder\\"

[HKEY_CLASSES_ROOT\Directory\shell\my custom command\command]
@="cmd.exe /s /k pushd \"%V\""

2. Context menu to folder background (empty area of a folder):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\my custom command]
@="My command name"
"AppliesTo"="C:\\My specific Folder\\"

[HKEY_CLASSES_ROOT\Directory\Background\shell\my custom command\command]
@="cmd.exe /s /k pushd \"%V\""

The line "AppliesTo"="C:\\My specific Folder\\" set which specific folder the menu entry will appear.

The problem is in (2) it won't accept "AppliesTo"="C:\\My specific Folder\\". If I put that registry value ("AppliesTo") the menu entry won't appear at all. How do I set a specific folder to (2)?

0

You need to use property names like:

AppliesTo = System.ItemName:"foo"
System.FileName
System.ItemFolderPathDisplay
System.ItemPathDisplay

There's a lot of these. Check out: https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/libs/portaudio/src/hostapi/wasapi/mingw-include/propkey.h?at=FS-3387_new_pa

  • I have tried all these. Please, post a working example. Say, "C:\My folder" – Azevedo Mar 10 '18 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.