问题
I need to add a Context Menu Item to Explorer Shell in Windows. This is easy doing by adding some Registgry Entry:
[HKEY_CLASSES_ROOT\Drive\shell\Disk cleanup\command]
@="cleanmgr.exe"
but i like to add this entry only for drive C:\ or so. How i can do this?
Thanks!
回答1:
Try this. (Works on Windows 7 here.)
[HKEY_CLASSES_ROOT\Drive\shell\Disk cleanup\command]
@="cleanmgr.exe"
"AppliesTo"="C:"
See Creating Shortcut Menu Handlers and Advanced Query Syntax for more about the AppliesTo field.
I don't see the exact usage above listed for drives but it seems to work and mimics other listed usages.
来源:https://stackoverflow.com/questions/27648332/how-i-can-add-a-entry-to-shell-menu-only-on-drive-c