4

我一直在尝试添加一个命令来在我的 Windows 7 64 位上处理 PNG 文件:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.png\OpenWithProgids]
"pngfile"=""

[HKEY_CLASSES_ROOT\pngfile\shell\PNGProcess]
@="Process"

[HKEY_CLASSES_ROOT\pngfile\shell\PNGProcess\command]
@="\"C:\\Program Files (x86)\\PNGProcess\\pngproc.exe\" \"%1\""

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice]
"Progid"="PBrush"

[HKEY_CURRENT_USER\Software\Classes\.png]
@="png_auto_file"

它适用于 Windows XP,但不适用于 64 位 Windows 7。

相同的注册表添加适用HKCR\jpegfile于该 Windows 7 64 位系统,但HKCR\pngfile不起作用。

我再次检查以验证这些条目是否确实存在于注册表中的正确位置。他们是这样!

对此感到困惑,我检查了其他将上下文菜单项添加到图形文件扩展名的程序,果然即使使用古老的 GIMP 也存在这个问题!

我试图查找有关 PNG 和 Windows 7 的已知特性的信息,但找不到任何信息。

pngfile知道Windows 7有什么特别之处吗?

更新:按照以下建议,我在右键单击 .png 文件(访问上下文菜单)时捕获了相关操作,该文件会自动重新创建值png_auto_file

4:05:53.3456954 PM  Explorer.EXE    2696    RegOpenKey  HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS Desired Access: Query Value
4:05:53.3457486 PM  Explorer.EXE    2696    RegQueryValue   HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice\Progid SUCCESS Type: REG_SZ, Length: 14, Data: PBrush
4:05:53.3457983 PM  Explorer.EXE    2696    RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS 
4:05:53.3532997 PM  Explorer.EXE    2696    RegOpenKey  HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS Desired Access: Query Value
4:05:53.3533494 PM  Explorer.EXE    2696    RegQueryValue   HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice\Progid SUCCESS Type: REG_SZ, Length: 14, Data: PBrush
4:05:53.3534160 PM  Explorer.EXE    2696    RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS 
4:05:53.3605580 PM  Explorer.EXE    2696    RegOpenKey  HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS Desired Access: Query Value
4:05:53.3606023 PM  Explorer.EXE    2696    RegQueryValue   HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice\Progid SUCCESS Type: REG_SZ, Length: 14, Data: PBrush
4:05:53.3606462 PM  Explorer.EXE    2696    RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS 
4:05:53.3670219 PM  Explorer.EXE    2696    RegOpenKey  HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS Desired Access: Query Value
4:05:53.3670721 PM  Explorer.EXE    2696    RegQueryValue   HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice\Progid SUCCESS Type: REG_SZ, Length: 14, Data: PBrush
4:05:53.3671219 PM  Explorer.EXE    2696    RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS 
4:05:53.3886634 PM  Explorer.EXE    2696    RegOpenKey  HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS Desired Access: Query Value
4:05:53.3887094 PM  Explorer.EXE    2696    RegQueryValue   HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice\Progid SUCCESS Type: REG_SZ, Length: 14, Data: PBrush
4:05:53.3887554 PM  Explorer.EXE    2696    RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS 
4:05:53.4146451 PM  Explorer.EXE    2696    RegOpenKey  HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS Desired Access: Query Value
4:05:53.4146940 PM  Explorer.EXE    2696    RegQueryValue   HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice\Progid SUCCESS Type: REG_SZ, Length: 14, Data: PBrush
4:05:53.4147417 PM  Explorer.EXE    2696    RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS 
4:05:53.7282785 PM  Explorer.EXE    2696    RegOpenKey  HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS Desired Access: Query Value
4:05:53.7283091 PM  Explorer.EXE    2696    RegQueryValue   HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice\Progid SUCCESS Type: REG_SZ, Length: 14, Data: PBrush
4:05:53.7283375 PM  Explorer.EXE    2696    RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS 
4:05:53.7680034 PM  Explorer.EXE    2696    RegOpenKey  HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS Desired Access: Query Value
4:05:53.7680323 PM  Explorer.EXE    2696    RegQueryValue   HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice\Progid SUCCESS Type: REG_SZ, Length: 14, Data: PBrush
4:05:53.7680595 PM  Explorer.EXE    2696    RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS 
4:05:53.7848014 PM  Explorer.EXE    2696    RegOpenKey  HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS Desired Access: Query Value
4:05:53.7848311 PM  Explorer.EXE    2696    RegQueryValue   HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice\Progid SUCCESS Type: REG_SZ, Length: 14, Data: PBrush
4:05:53.7848591 PM  Explorer.EXE    2696    RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS 
4:05:53.8001734 PM  Explorer.EXE    2696    RegOpenKey  HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS Desired Access: Query Value
4:05:53.8002023 PM  Explorer.EXE    2696    RegQueryValue   HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice\Progid SUCCESS Type: REG_SZ, Length: 14, Data: PBrush
4:05:53.8002303 PM  Explorer.EXE    2696    RegCloseKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice    SUCCESS 
4

1 回答 1

3

这些密钥可能失败的原因有多种,而且您几乎没有提供任何信息,因此这些是一般故障排除提示

  1. 您没有说,但您是否将.png文件链接到pngfileProgID?您可以检查的默认值HKCR\.png
  2. 是否为将 ProgID 更改为其他内容的文件UserChoice分配了默认程序/ ?您可以通过查找和检查该 ProgID来检查.pngpngfileHKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice
  3. 这个“PNGProcess”动词的HKCU版本是否指向不同的应用程序或配置错误?检查那个键HKCU\Software\Classes\.png

问题编辑后更新:

.reg你的文件有不一致的地方。您将PNGProcess动词添加到pngfileProgID,但您将设置UserChoicePBrush,然后将默认.pngProgID 设置为png_auto_file。那是三个不同的 ProgID。它们都必须相同。

于 2012-04-29T00:48:45.633 回答