I know this is an old post, but I think this issue is due to a corrupted or damaged profile. I'm having the same problem on a Windows 7 SP1 Home Premium laptop and this error occurs on all images being opened by Windows Photo Viewer no matter the location or permissions. When I log in with another profile, it works fine.
This is not my laptop, and it has a bit of an unusual setup, which is the C:\Users folder is actually a symbolic link to a folder on a different drive (F:\Users). Sometimes the symbolic link gets damaged and I have to repair it. This issue occurred after I fixed the symbolic link and ran some scans to remove potential malware, etc. I am not sure when this issue occurred, but I thought maybe this information might help others, since even now (4 years after this was first posted) I still can't find a proper solution for this to fix it, but at least I've narrowed it down to the profile.
EDIT:
Okay, I fixed my issue. It turned out the permissions on the folder "C:\Users\%username%\AppData\Local\Temp\" was screwed up (meaning there were no permissions set and no owner).
STEPS TO FIX:
- I had to take ownership of the folder
- Remove all existing permissions
- Select "Include inheritable permissions from this object's parent" and click OK until all the permission windows are closed.