Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I get Windows Photo Viewer to run in Safe Mode? I'm running Microsoft Windows 7.


share|improve this question
Can't you just navigate to the photo viewer application file and run it? – yiwei Jul 29 '13 at 19:48
Ahh okay. Sorry I didn't know that. Can you use any other photo viewer? Or do you have to use the windows one? – yiwei Jul 30 '13 at 1:54
Thanks gronostaj! – Mark Rowe Jul 30 '13 at 10:04

Quick analysis

During its startup phase, Windows Photo Viewer uses the GetSystemMetrics API function to check whether the system was started in safe mode. If that's the case, it will display the following message:

Windows Photo Viewer does not work in safe mode. If you want to view pictures or videos, restart your computer normally.

The actual code is located inside the PhotoViewer.dll library file, which can be usually found in these folders:

  • Windows Vista

    C:\Program Files\Windows Photo Gallery
  • Windows 7 and later

    C:\Program Files\Windows Photo Viewer

Further reading


Use Paint or a third-party image viewer such as IrfanView, XnView, or FastStone Image Viewer.

Patching the limitation

The library file can be patched in order to fool the viewer into thinking the operating system wasn't started in safe mode. Despite what the warning message says, all features except printing appear to be working fine.

Note While the patch might have some side effects, it doesn't seem the case according to my tests.

  1. Open the program folder, which is usually located here:

     C:\Program Files\Windows Photo Viewer
  2. Copy the PhotoViewer.dll file to the desktop, and rename it to PhotoViewer2.dll.

  3. Open PhotoViewer2.dll file using a hex editor (e.g. HxD).

  4. Go to the proper hexadecimal offset. See below.

  5. Change the first two bytes there to 3BC0, and save the changes.

  6. Copy the saved file to the program folder.

  7. Open an elevated command prompt, type or paste the following command, and press Enter:

    cd /d "%programfiles%\Windows Photo Viewer"
  8. Replace the original library with the patched one by running these commands:

    taskkill /im explorer.exe /f
    takeown /f PhotoViewer.dll /a
    icacls PhotoViewer.dll /grant:r *S-1-5-32-544:F
    ren PhotoViewer.dll PhotoViewer.dll.old
    ren PhotoViewer2.dll PhotoViewer.dll
    start explorer


  • Windows Vista SP2 x86 (32-bit)

  • Windows Vista SP2 x64 (64-bit)

  • Windows 7 SP1 x86 (32-bit)

  • Windows 7 SP1 x64 (64-bit)

  • Windows 8 x86 (32-bit)

  • Windows 8 x64 (64-bit)

  • Windows 8.1 x86 (32-bit)

  • Windows 8.1 x64 (64-bit)




Screenshot 1


Screenshot 2

Click for larger view.

share|improve this answer
Hi thanks for your help here but i can't find my relevant Offset. – Mark Rowe Jan 20 '15 at 14:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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