为什么HKCR \ pngfile上下文菜单在Windows XP中有效但在Windows 7中无效?

时间:2012-04-27 21:58:59

标签: windows-7 registry windows-7-x64 file-association

我一直在尝试添加一个命令来处理我的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,但不适用于Windows 7 64位。

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

我仔细检查以验证这些条目是否实际存在于注册表中的正确位置。他们做到了!

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

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

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

更新:根据以下建议,当我右键单击.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 

1 个答案:

答案 0 :(得分:3)

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

  1. 您没有说,但您是否已将.png个文件与pngfile ProgID相关联?您可以检查HKCR\.png
  2. 的默认值
  3. 是否为UserChoice文件分配了默认程序/ .png,这些文件会将ProgID更改为pngfile以外的其他内容?您可以通过查找HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice并检查该ProgID
  4. 进行检查
  5. 这个“PNGProcess”动词的HKCU版本是否指向不同的应用程序或者配置错误?在HKCU\Software\Classes\.png
  6. 中检查该密钥

    问题修改后更新:

    您的.reg文件中存在不一致之处。您正在将PNGProcess动词添加到pngfile ProgID,但是您将UserChoice设置为PBrush,然后您设置了默认.png ProgID到png_auto_file。这是三种不同的ProgID。他们需要都是一样的。

相关问题