Windows Picture and Fax viewer is opening the wrong file when double-clicking on the file.

Posted on 2010-08-24
Last Modified: 2012-05-10
I have a client who uses Windows Picture and Fax viewer for its function of printing multiple pictures on a single sheet of paper.

Within the last week, the user has been clicking on a file, only to have the picture and fax viewer display that the file is empty. Further investigation shows that it is opening other files (or folders!) in the directory.

As an example: I double-click on a .JPG on the desktop, and it will instead try to open a folder on the desktop, according to the name in the title bar. If I use the previous or next buttons in the program it will open other picture files fine.

If I right-click on a picture and select "preview," I get the same behavor. If I double-click the desktop file from the explorer, I get a different file but the same behavior.

If I right-click and select "Open" or "Open with," I get the correct file. If I drag the file into an already open instance of the picture and fax viewer, I get the correct file. If I open the file from the picture and fax viewer's menu, I get the correct file.

I tried dis-associating the picture and fax viewer (using irfanview as a temporary association), but it still did not work after re-associating with the picture and fax viewer. Irfanview opens the file just fine.

I have tried this with multiple accounts. I cannot remember off the top of my head if I tried it with multiple files. Searching has turned up nothing that even comes close to this problem. A cursory glance at the registry shows nothing out of the ordinary.

Anyone have any ideas? I would switch the user over to another image viewer, but he uses that multiple pictures, one sheet of paper feature as one of the main facets of his business. In the meantime I've provided him with a few workarounds that still let him get his job done.
Question by:jamie177
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 30

Expert Comment

ID: 33513196
In Folder Options>View just above the show hidden files option there
is a check box for 'Do not cache thumbnails'

Try checking this and testing

Expert Comment

ID: 33513244
flubbster sounds like he has the right answer.  Another way to test this is to open My Computer - choose the Desktop from the dropdown and try opening from there.  If it works then it appears something is happening on your desktop (display) such as old cached files that are not properly updating.

Author Comment

ID: 33523834
The turning off of Cached thumbnails did not help.

The client has found a temporary workaround. He has created folders on his desktop, and when he puts pictures in there they open up properly. So the problem seems isolated to only his desktop, no matter how you get to it.  If you open up the desktop in the explorer, it will automatically go to a grid.jpg file that was present on the desktop, But if you open up images anywhere else, it will open properly.

I am suspecting the thumbnail file or something in the desktop is corrupted more and mroe now.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 33579913
I found that the system needed a checkdisk, which I ran. The end user reports that after the check the problem is still occuring, however.

LVL 38

Expert Comment

ID: 33603757
Hi Jamie
"A cursory glance at the registry shows nothing out of the ordinary".

The command in Windows XP that opens an image file in the Windows Picture and Fax Viewer (double-click or Right-Click > Preview) is:
rundll32.exe C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen %1
Note: No double-quotes around the path or %1 variable.

Do a regedit search for shimgvw.dll,ImageView_Fullscreen and just double-check that all instances match that command.  I have found in many commands that use the %1 variable that if the %1 is double-quoted, the command fails or exhibits odd behaviour.

Out of curiosity, create the following *.Bat or *.CMD file on the desktop and drop an image file onto it.

@echo off
echo %1
rundll32 shimgvw.dll,ImageView_Fullscreen %1

Expected result is that the batch file shows the double-quoted path and fails to run the command.

Change %1 to %~1 (which removes the double-quotes that are automatically added to the variable) and test again.
Expected result is that the batch file shows the full unquoted path to the image dropped, and the command is executed correctly to show that image.  This emulates what the command in the registry should be executing.

Now change %~1 to %~0 (ie. the full path of the batch file executed when the image is dropped) and test again.
Expected behaviour is that the batch file shows the full unquoted current directory path to the batch file and tries to open it ("no preview available" and shows batch file name and path Title Bar), but the next button then shows the files in that directory as it should.

Changing %~0 to %~dp0 or %~1 to %~dp0 (ie. directory path but not file name, terminated by trailing backslash)  - Windows Picture and Fax Viewer will show "no preview available", nothing in Title Bar, and will not show the previous and next buttons.

Without any %1, %0, or any other permutation of the % variable following the command, Windows Picture and Fax Viewer will do the same as above.

Try the command with the full path to a named image file. hat should always work.

Of course, a batch file isn't quite the same as Windows Shell Extensions or Double-Clicking to invoke the file type association.  The above is just a demonstration of differing behaviour, but perhaps the issue is something as simple as a wrong variable in the registry, a space between % and 1, or unwanted double quotes around the %1.

It's worth verifying just in case, but I suspect the "thumbnail" theory is the problem.


Accepted Solution

jamie177 earned 0 total points
ID: 33843496
The user and I both agreed that this issue was not impacting user performance, and none of the fixes I tried worked. The scans of the registry did not come back successful. The above scripts, when run on my computer, seemed to check out as a valid way to test the issue, but again without finding anything in the registry I cannot say anything definitive.

The best solution was to move the image files to another folder and print/work with them from there.

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction In a previous article ( (now deprecated), I discussed how to upgrad…
In a previous article here at Experts Exchange (…
The goal of the tutorial is to teach the user what exposure is and how to use the exposure slider. Analyze the photo that you want to edit, then adjust the exposure slider to your liking.
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question