Windows 7 - 为 .png 文件添加 shell 命令

Axi*_*ili 6 windows-registry windows-7 shell context-menu

在 Windows XP 上,您可以转到文件夹选项 - 文件类型,选择 PNG,创建一个新操作,例如

Action: Crush
Application: "F:\Programs\PNGCrush\crush.bat" "%1"
Run Code Online (Sandbox Code Playgroud)

因此,您可以右键单击.png文件并选择Crush

您如何在 Windows 7 上执行此操作?我假设通过regedit.reg归档,但如何?

编辑:感谢您的所有回复……但如果可能,我想避免使用“打开方式”或第 3 方程序。

igl*_*vzx 2

要向.png文件的右键单击上下文菜单添加新项目,请在注册表中添加新项和command子项。HKEY_CLASSES_ROOT\pngfile\shell\

根据您的示例,导入以下.reg文件应该可以工作:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\pngfile\shell\PNGCrush]
@="Crush"

[HKEY_CLASSES_ROOT\pngfile\shell\PNGCrush\command]
@="\"F:\\Programs\\PNGCrush\\crush.bat\" \"%1\""
Run Code Online (Sandbox Code Playgroud)