Link to home
Start Free TrialLog in
Avatar of jamie177
jamie177

asked on

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

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.
Avatar of flubbster
flubbster
Flag of United States of America image

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
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.
Avatar of jamie177
jamie177

ASKER

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

Avatar of BillDL
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
pause

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.

Bill
ASKER CERTIFIED SOLUTION
Avatar of jamie177
jamie177

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial