Page 1 of 1

Open with associated program fails - see details

Posted: Wed Aug 08, 2012 6:09 pm
by Sprintdriver
Hi.

On my XP machine, I cannot open BMP pictures in the associated program and I think I know why.

When rightclicking a BMP file in Windows Explorer (WE), it yelds "IrfanView" while it yelds "Open" for other image extension.

That means if the default registry key that define the program opening command is

Code: Select all

HKEY_CLASSES_ROOT\Paint.Picture\shell\IrfanView
then XnView won't open the file.

A workaround is to rename the key into HKEY_CLASSES_ROOT\Paint.Picture\shell\Open and change the HKEY_CLASSES_ROOT\Paint.Picture\shell\ from IrfanView to Open.

A little bug, but annoying. Especially for most people that isn't that familiar with Windows registry and file association.

Tested on:
  • OS = Windows XP sp3
  • XnView version 1.99 (jun 4 2012)

Re: Open with associated program fails - see details

Posted: Sun Aug 12, 2012 1:00 pm
by xnview
Even if you start XnView with admin rights?

Re: Open with associated program fails - see details

Posted: Mon Aug 13, 2012 3:05 pm
by Sprintdriver
xnview wrote:Even if you start XnView with admin rights?
Hi.

No, the admin rights is not a part here.

I try to say that if file association registry setting (the ky as reffered abowe) has a name that is not exacly equal to "Open" then XnVIew will fail to open it.

To depict an example. XnView will open files correctly if this first registry setting is present:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Paint.Picture]
@="Punktgrafikkbilde"
"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008

[HKEY_CLASSES_ROOT\Paint.Picture\DefaultIcon]
@="shimgvw.dll,1"

[HKEY_CLASSES_ROOT\Paint.Picture\shell]
@="Open"

[HKEY_CLASSES_ROOT\Paint.Picture\shell\edit]

[HKEY_CLASSES_ROOT\Paint.Picture\shell\edit\command]
@=hex(2):22,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,\
00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,\
73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,\
00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\Paint.Picture\shell\Edit with GIMP]
@="Edit with GIMP"

[HKEY_CLASSES_ROOT\Paint.Picture\shell\Edit with GIMP\command]
@="\"D:\\Grafiske\\GIMP-2-6-12\\bin\\gimp-2.6.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Paint.Picture\shell\Open]

[HKEY_CLASSES_ROOT\Paint.Picture\shell\Open\command]
@="D:\\Grafiske\\IrfanView\\i_view32.exe \"%1\""
But If I rename "Open" into eg. "AnotherName" then XnView will fail to open in external default program, even if it works in Windows.
Example below will not work:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Paint.Picture]
@="Punktgrafikkbilde"
"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008

[HKEY_CLASSES_ROOT\Paint.Picture\DefaultIcon]
@="shimgvw.dll,1"

[HKEY_CLASSES_ROOT\Paint.Picture\shell]
@="AnotherName"

[HKEY_CLASSES_ROOT\Paint.Picture\shell\edit]

[HKEY_CLASSES_ROOT\Paint.Picture\shell\edit\command]
@=hex(2):22,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,\
00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,\
73,00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,\
00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\Paint.Picture\shell\Edit with GIMP]
@="Edit with GIMP"

[HKEY_CLASSES_ROOT\Paint.Picture\shell\Edit with GIMP\command]
@="\"D:\\Grafiske\\GIMP-2-6-12\\bin\\gimp-2.6.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Paint.Picture\shell\AnotherName]

[HKEY_CLASSES_ROOT\Paint.Picture\shell\AnotherName\command]
@="D:\\Grafiske\\IrfanView\\i_view32.exe \"%1\""

Re: Open with associated program fails - see details

Posted: Thu Aug 16, 2012 2:58 pm
by xnview
But the correct registry key is "Open"

Re: Open with associated program fails - see details

Posted: Thu Aug 16, 2012 4:45 pm
by Sprintdriver
xnview wrote:But the correct registry key is "Open"
Yes I'm agree on that. But other windows program may steel a file association and fail to make it correct.

Fortunately for me I happens to know some bit on how the file association in windows is hanging together. A regular user that have no idea on windows registry will probably have no clue how to fix this issue.

Further on, the error message that appears does not have any meaning for a regular user, as he knows that the file opens normally in Windows Explorer.
A regular user will also claim to have used Ccleaner and maybe other similar cleaning programs because he think that will help. It doesn't because Ccleaner claims that the file extension have no error.

Thanks