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:
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.
Open the program folder, which is usually located here:
C:\Program Files\Windows Photo Viewer
PhotoViewer.dll file to the desktop, and rename it to
PhotoViewer2.dll file using a hex editor (e.g. HxD).
Go to the proper hexadecimal offset. See below.
Change the first two bytes there to
3BC0, and save the changes.
Copy the saved file to the program folder.
Open an elevated command prompt, type or paste the following command, and press Enter:
cd /d "%programfiles%\Windows Photo Viewer"
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
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)
Click for larger view.