如何在 Windows 10 中恢复照片查看器?

如何在 Windows 10 中恢复照片查看器?

在 Windows 10 中,打开图像时,它让我可以选择在 Photos metro 应用程序、Paint 或 GIMP 中打开。

我希望它在照片查看器中打开,但是当我将“打开方式”指向“C:/Program Files/Windows Photo Viewer”或“C:/Program Files (x86)/Windows Photo Viewer”中的 PhotoViewer.dll 时,出现“此应用程序无法在您的电脑上运行”的错误。

我知道我可以使用 Irfanview 或类似的程序,但我更喜欢使用 Photo Viewer。有什么方法可以恢复它吗?

答案1

我认为由于您第一次尝试直接运行 .dll,因此条目“Windows 照片查看器”仍然指向 .dll 而不是 rundll32,当然您不能直接运行它。

尝试将以下内容添加到注册表:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll]

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell]

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open]
"MuiVerb"="@photoviewer.dll,-3043"

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\
6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\
00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\
25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\
00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\
6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\
00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\
5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\
00,31,00,00,00

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\DropTarget]
"Clsid"="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\print]

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\
6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\
00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\
25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\
00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\
6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\
00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\
5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\
00,31,00,00,00

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\print\DropTarget]
"Clsid"="{60fd46de-f830-4894-a628-6fa81bc0190d}"

来源

如果这不起作用,请尝试在注册表中搜索 Windows 照片查看器和 photoviewer.dll,看看是否有任何对直接调用 photoviewer.dll 的引用(不使用 rundll32)。

答案2

我已经让它工作了,我想你必须用旧的照片查看器成功打开图像一次,然后才能将其设置为默认值。

  1. 在命令提示符下使用此命令打开图像 %SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_FullscreenpathToImageNoQuotes

  2. 然后我有这个选择

在此处输入图片描述

现在我的 PNG 默认使用旧的照片查看器打开,效果很好。

答案3

将其放入 .reg 文件中并运行:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\jpegfile\shell\open]
"MuiVerb"=hex(2):40,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,\
  69,00,6c,00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,\
  00,20,00,50,00,68,00,6f,00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,\
  72,00,5c,00,70,00,68,00,6f,00,74,00,6f,00,76,00,69,00,65,00,77,00,65,00,72,\
  00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,34,00,33,00,00,00

[HKEY_CLASSES_ROOT\jpegfile\shell\open\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\
  6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\
  00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\
  25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\
  00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\
  6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\
  00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\
  5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\
  00,31,00,00,00

这将使所有 JPEG 文件都可以在照片查看器中查看。如果您希望其他类型也能正常工作,只需将代码中的“jpegfile”替换为“pngfile”、“giffile”、“Paint.Picture”(Paint.Picture 是 .bmp 类型)

找到任意图片,右键单击,选择打开方式,然后找到 Windows 照片查看器并将其选为默认程序。

答案4

我找到了一个无需更改注册表的解决方案。我已遵循TechnoCore 的答案,但正如评论所指出的,第二部分对我来说也不起作用。因此,这是要做的事情:

  1. 以管理员身份打开命令行
  2. 输入以下内容:
>ftype MyFileType=%SystemRoot%\System32\rundll32.exe "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll" ImageView_Fullscreen %1
>assoc .jpg=MyFileType
  1. 然后转到图像文件并选择打开方式...然后选择刚刚输入的命令: 在此处输入图片描述

确保选中“始终使用此应用程序...”选项。
对要与 Windows 照片查看器关联的所有文件类型重复此操作。

相关内容