83

In Windows 10, when opening images, it gives me the option to open in the Photos metro app, Paint, or GIMP.

I'd like it to open in Photo Viewer, but when I directed "Open with" to PhotoViewer.dll in "C:/Program Files/Windows Photo Viewer", or "C:/Program Files (x86)/Windows Photo Viewer", I get a "This app can not run on your PC" error.

I know I could use Irfanview or the sort, but I'd prefer to be able to use Photo Viewer. Is there any way I can bring it back?

  • 1
    You can't open an image with a non-executable file. This question does not make a great deal of sense. – Ramhound Jul 30 '15 at 16:12
  • AFAIK, it's been replaced by the new app Photos like you mentioned. This isn't new to Windows 10, Windows 8 replaced it as well. There's no way to bring it back as it is no longer a feature. – MC10 Jul 30 '15 at 16:21
  • 21
    @Ramhound The question makes perfect sense. – Louis Jul 30 '15 at 16:32
  • @MC10 But I had Photo Viewer in Windows 8.1? The PhotoViewer.dll trick worked there. – Irastris Jul 30 '15 at 16:49
  • @Ramhound That's how it worked in Windows 8.1, I could set it to open with PhotoViewer.dll. – Irastris Jul 30 '15 at 16:50
76

I think because of your first attempt to run the .dll directly, the entry "Windows Photo Viewer" still points to the .dll instead of rundll32, which of course you can't run directly.

Try adding the following to the registry:

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}"

(Source)

If that doesn't work, try searching the registry for Windows Photo Viewer and photoviewer.dll to see if there are any references to photoviewer.dll being called directly (without rundll32).

  • 3
    great, it worked. – Rajkishor Sahu Aug 22 '15 at 13:34
  • 3
    It also worked for me, Windows 10 Pro 64 bits, and fr-ch localization. Great ! – Michaël Polla Oct 9 '15 at 21:48
  • 3
    The hex string is utf-16 for %SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen %1". I just did a xxd -r -p | tr -d '\0' on it. – isanae Mar 27 '16 at 0:25
  • This answer nails the problem - it is a 32-bit DLL and so needs to be run with rundll32. Another option to avoid regedit is to pin something (anything) to the start menu and then edit it so that the shortcut is to %SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen <folder>. – SomeoneElse Apr 11 at 14:58
27

I got mine to work, I think you have to successfully open an image with the old photo viewer once, then you can set it as default.

  1. Open an image with this in command prompt %SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen pathToImageNoQuotes

  2. Then I have this option

enter image description here

Now my PNGs open with the old photo viewer by default, works great.

  • 1
    This only half worked. :/ Launching PhotoViewer from the Command Prompt worked perfectly, but when I tried to set the PNG to open with Photo Viewer afterward, I still got the "This app can not run on your PC" error. – Irastris Jul 30 '15 at 17:02
  • awww, I'm sorry. That error is usually x86 x64 issues, running an x64 app on x86 install. Wonder what gives... – TechnoCore Jul 30 '15 at 17:08
  • @Irastris which bit version of Windows 10 are you on? There is an x86 path, perhaps that would work for you. %SystemRoot%\System32\rundll32.exe "%ProgramFiles(x86)%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen pathToImage – MC10 Jul 30 '15 at 17:20
  • @MC10 Windows 10 Pro 64Bit, from the GWX upgrade. :D – Irastris Jul 30 '15 at 18:10
  • 1
    for me, this opens the photo viewer: %SystemRoot%\System32\rundll32.exe "%ProgramFiles(x86)%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen, yet when I add an image path at the end, nothing happens, and no applications opens up. – Saeed Neamati May 23 '16 at 10:05
18

Put this in a .reg file and run it:

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

This will make all JPEG files viewable in Photo Viewer. If you want to make other types work as well just replace "jpegfile" in the code with "pngfile", "giffile", "Paint.Picture" (Paint.Picture is the .bmp type)

Find any picture, right-click, choose Open With, then find Windows Photo Viewer and select it as default program.

  • Didn't work. Still getting the "This app can not run on your PC." error. – Irastris Jul 30 '15 at 22:21
  • 2
    This worked for me, thanks. Windows 10 64. – Martin Hansen Aug 8 '15 at 19:53
  • worked fine (y) thx – NSGaga Nov 13 '15 at 20:08
13

You can also use Winaero Tweaker to activate Windows Photo Viewer, as shown in the following screenshot. Just follow the description (within the green box), and you're all set.

PS: Winaero Tweaker is a free tool, which can be used to tweak many aspects of Windows 10.

Winaero Tweaker - Activate Windows Photo Viewer

  • 2
    It's nice to see that WinAero got an update for this. – Irastris Sep 18 '15 at 13:25
  • 2
    This turned out to actually be the easiest solution for me, due to avoiding the Windows Registry Editor. – grunwald2.0 Dec 13 '15 at 19:29
  • This should be the accepted answer. – cheeesus Apr 15 at 19:42
3

Unfortunately, none of the above answers worked for me, but they pointed me in the right direction.

  1. Right-click on an image in Windows Explorer, choose Open With, then Choose another app.
  2. In the dialog, scroll down and click on More apps, then `Look for another app on this PC.
  3. Then, at the bottom right, choose All Files (*.*) instead of Programs (*.exe ...), then navigate to C:\Program Files\Windows Photo Viewer and choose PhotoViewer.dll.
  4. Photo Viewer opens. Close it.
  5. Repeat Step 1: Right-click again on the image, choose Open With, then Choose another app.
  6. Again scroll down to click on More apps.
  7. Now Windows Photo Viewer appears in the apps list. Choose it and click on Always use this app to open .png files.

Once you did steps 1-4, you don't have to repeat them for other file types. Steps 5-7 should suffice.

  • 2
    DOESN'T WORK on Windows 10 Enterprise 2016 x64 (clean install) :(. Steps 1-3 atually works no problem, and the .dll file is there. In fact, now Photo Viewer shows up as an available app as in steps 5-7. However, when I select to use it I get the warning: This app can't run on your PC, To find a version for your PC, check with the software publisher. tried – theforestecologist Jan 7 at 2:30
  • @theforestecologist Yes, it didn't work for me either when I tried it the last time. Two years ago it did, however. The best solution at the moment is Winaero Tweaker. – cheeesus Apr 15 at 19:42
2

I have found a solution without having to alter the registry. I have followed TechnoCore's answer, but as the comments indicated, the second part wasn't working for me either. So this is what to do:

  1. Open a command line as administrator
  2. Type in the following:
>ftype MyFileType=%SystemRoot%\System32\rundll32.exe "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll" ImageView_Fullscreen %1
>assoc .jpg=MyFileType
  1. Then go to the image file and choose open with... and then choose the command you just typed: enter image description here

Make sure you have the "Always use this app..." option checked.
Repeat it for all file types you want to associate with Windows Photo Viewer.

protected by Community Jul 31 '15 at 18:31

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.