Windows Explorer: Context menu to a especific folder (background)

8

1

(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)?

Azevedo

Posted 2016-01-01T02:41:06.403

Reputation: 511

I'm finding the same behaviour, and have not found out how to use an AppliesTo alongside Directory\Background. – drglove – 2016-04-18T21:42:11.377

See this: https://msdn.microsoft.com/en-us/library/cc144171(VS.85).aspx

– Biswapriyo – 2018-02-23T15:41:54.507

Answers

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

ZXX

Posted 2016-01-01T02:41:06.403

Reputation: 118

I have tried all these. Please, post a working example. Say, "C:\My folder" – Azevedo – 2018-03-10T14:35:58.440