94

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?

7
  • 24
    @Ramhound The question makes perfect sense. Commented Jul 30, 2015 at 16:32
  • @MC10 But I had Photo Viewer in Windows 8.1? The PhotoViewer.dll trick worked there.
    – Irastris
    Commented Jul 30, 2015 at 16:49
  • @Ramhound That's how it worked in Windows 8.1, I could set it to open with PhotoViewer.dll.
    – Irastris
    Commented Jul 30, 2015 at 16:50
  • @Irastris did you see my answer? You can definitely use the dll and photo viewer still works in win 10. Give me that answer credit :D
    – TechnoCore
    Commented Jul 30, 2015 at 16:52
  • Interesting, I hadn't tried that or heard of it. Well if it works, that's great.
    – MC10
    Commented Jul 30, 2015 at 17:15

7 Answers 7

80

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).

5
  • 3
    great, it worked.
    – Raj
    Commented Aug 22, 2015 at 13:34
  • 3
    It also worked for me, Windows 10 Pro 64 bits, and fr-ch localization. Great ! Commented Oct 9, 2015 at 21:48
  • 8
    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
    Commented Mar 27, 2016 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>. Commented Apr 11, 2019 at 14:58
  • Windows 10 LTSC worked
    – JustWe
    Commented Sep 13, 2019 at 11:15
25

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.

9
  • 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
    Commented Jul 30, 2015 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
    Commented Jul 30, 2015 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
    Commented Jul 30, 2015 at 17:20
  • @MC10 Windows 10 Pro 64Bit, from the GWX upgrade. :D
    – Irastris
    Commented Jul 30, 2015 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. Commented May 23, 2016 at 10:05
17

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.

2
  • Didn't work. Still getting the "This app can not run on your PC." error.
    – Irastris
    Commented Jul 30, 2015 at 22:21
  • worked fine (y) thx
    – NSGaga
    Commented Nov 13, 2015 at 20:08
14

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

5
  • 2
    It's nice to see that WinAero got an update for this.
    – Irastris
    Commented Sep 18, 2015 at 13:25
  • 2
    This turned out to actually be the easiest solution for me, due to avoiding the Windows Registry Editor. Commented Dec 13, 2015 at 19:29
  • This should be the accepted answer. Commented Apr 15, 2019 at 19:42
  • It redirects to Set your default programs in Control Panel. I don't know if Windows Photo Viewer is visible without Winaero Tweaker though.
    – Burak
    Commented Nov 11, 2021 at 13:07
  • After coming to this page again, I compared what changed before and after Winaero Tweaker. It adds 9 new default extensions on top of the existing ones (.tif and .tiff).
    – Burak
    Commented Feb 10, 2022 at 8:41
5

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.

1
  • For me this was the best workaround to bring Windows Photo Viewer back, considering the machine I'm working at work has no internet connection.
    – Fábio
    Commented Jun 3, 2024 at 2:46
2

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
  • 3
    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 Commented Jan 7, 2019 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. Commented Apr 15, 2019 at 19:42
1

I didnt care for the other Registry answers, as they were all encoded. Here is one that is decoded:

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg]
[HKEY_CLASSES_ROOT\jpegfile\shell\open\command]
@="rundll32.exe \"C:\\Program Files\\Windows Photo Viewer\\PhotoViewer.dll\",ImageView_Fullscreen %1"

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png]
[HKEY_CLASSES_ROOT\pngfile\shell\open\command]
@="rundll32.exe \"C:\\Program Files\\Windows Photo Viewer\\PhotoViewer.dll\",ImageView_Fullscreen %1"

If your %ProgramFiles% is not C:\Program Files, then adjust as needed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .