How i can add a Entry to Shell Menu only on drive

2019-07-21 11:12发布

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条回答
闹够了就滚
2楼-- · 2019-07-21 11:38

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.

查看更多
登录 后发表回答