Add a Windows Shell context menu entry for a specific extension (not file type)

空扰寡人 提交于 2019-11-28 22:05:33
Azevedo

Here you go:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\your custom app]
@="Open with your custom app"
"icon"="C:\\Windows\\notepad.exe,0"
"AppliesTo"=".nfo"

[HKEY_CLASSES_ROOT\*\shell\your custom app\command]
@="C:\\Windows\\notepad.exe \"%1\""

The line "AppliesTo"=".nfo" does the trick.

Works perfectly on Windows 10.

It works per file extension, regardless if there is an application associated with that extension or not. Doing this way it less invasive and leaves a very small footprint in the registry.

Compare to Add menu item to windows context menu only for specific filetype


Edit:

If you want to apply that command to more than one extension use:

"AppliesTo"="System.FileName:\"*.nfo\" OR System.FileName:\"*.log\""

Credit: https://superuser.com/questions/183785/windows-7-context-menu-for-folders-if-folder-contains-certain-filetypes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!