Vista Default Programs suggestion

Feedback and Comments on the new 1.96 Test version on Windows.

Moderators: XnTriq, helmut, xnview

ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Vista Default Programs suggestion

Post by ckit »

Any chance XnView could be added to Vista's "Default Program" system so that file associations actually work under Vista x64?
Currently, Windows Photo Gallery dominates the commonly used formats like GIF, JPG and PNG and I have to manually override them.
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Vista Default Programs suggestion

Post by xnview »

Don't know how, i'll search...
Pierre.
ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Post by ckit »

foobar2000 v0.9.6 and up implemented support for Vista's "Default Program" area and it works really well, same can be said for IrfanView and Media Player Classic Homecinema.

Windows 7 should use this feature as well but I haven't used W7 yet :)
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow

Re: Vista Default Programs suggestion

Post by ckv »

xnview wrote:Don't know how, i'll search...
There's a MSDN article for it. It's quite simple actually.

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

First you need to add xnview in RegisteredApplications key. Use e.g. xnview as name and value is path to your own registry key containing rest of the values.

Code: Select all

[HKEY_LOCAL_MACHINE\Software\RegisteredApplications]
"xnview"="Software\\XnView\\Capabilities"
In your own key, you add description text and name that will apper in the Default Programs dialog.

Code: Select all

[HKEY_LOCAL_MACHINE\Software\XnView\Capabilities]
"ApplicationDescription"="XnView is a fast multi-format graphics browser, viewer, and converter. It reads more than 400 file formats."
"ApplicationName"="XnView for Windows"
Then create new sub key called FileAssociations and add all file-extension and ProgID pairs you need in the key as follows.

Code: Select all

[HKEY_LOCAL_MACHINE\Software\XnView\Capabilities\FileAssociations]
".bmp"="XnView.bmp"
".gif"="XnView.gif"
".jpg"="XnView.jpg"
".png"="XnView.png"
".max"="XnView.Image"
".art"="XnView.Image"
...
Last edited by ckv on Fri Feb 06, 2009 4:32 pm, edited 1 time in total.
HotShot
Posts: 7
Joined: Wed Dec 10, 2003 7:36 am
Location: Berlin

Post by HotShot »

Let me *bump* this thread...

Complete integration to the Vista Default Programs would be a great addition - actually it's the last detail that keeps me from switching to XNView under Vista. Then XNView would be on par with other software e.g. Acdsee / Irfanview and such.
By the way, the "trick" used by foobar2000 to register the associations (i.e. a separate executable) has proven worthy.
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Vista Default Programs suggestion

Post by xnview »

Pierre.
ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Post by ckit »

Given the Setup version doesn't ask about File Associations while installing, I fail to see how this helps.

Now, I need to re-install the beta over the top again.
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

I've added the registry entries from ckv post
Pierre.
ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Post by ckit »

Thanks but it has problems sadly.

- Click XnView for Windows
- Click Set this program as default
- Click Choose defaults for this program

and...
All 9 associations now have the BMP icon and are recognised as XnView BMP types!

Image

but on the plus side we're closer to being perfect :)
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys
ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Post by ckit »

On further investigation, only one registry key was made...

[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
XnView=Software\XnView\Capabilities

The other one...
[HKEY_LOCAL_MACHINE\SOFTWARE\XnView\Capabilities]

Does not exist in my registry!

I'll manually add it and see what happens!
Nope, that just made XnView disappear from Vista Defaults!
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France

%hexa-code

Post by Clo »

:arrow: ckv

:) Hello !

{Aside}
…Edit: Damn these MSDN urls.
• You ought write the parenthesis (decimal 40 - 41) as %hexa-code like :
http://msdn.microsoft.com/en-us/library ... 85%29.aspx.
- Same for all other upper ASCI characters…
{/Aside}

:mrgreen: KR
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice
ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Post by ckit »

Nevermind, found it, Vista x64 is using Wow on me again...

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\XnView\Capabilities\FileAssociations]

Manually corrected entries and all is right with the world :)
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys
User avatar
xnview
Author of XnView
Posts: 44572
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

ckit wrote:Nevermind, found it, Vista x64 is using Wow on me again...

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\XnView\Capabilities\FileAssociations]

Manually corrected entries and all is right with the world :)
:-(
So on Vista 32, it's
HKEY_LOCAL_MACHINE\SOFTWARE\XnView\Capabilities\FileAssociations
and for vista 64, it's:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\XnView\Capabilities\FileAssociations

You have change only that? (For 'BMP image', it's my fault)
Pierre.
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow

Post by ckv »

xnview wrote::-(
So on Vista 32, it's
HKEY_LOCAL_MACHINE\SOFTWARE\XnView\Capabilities\FileAssociations
and for vista 64, it's:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\XnView\Capabilities\FileAssociations

You have change only that? (For 'BMP image', it's my fault)
I think you can't just write in the Wow6432Node, you have to do access 64-bit registry with KEY_WOW64_64KEY flag and write the values in normally. Otherwise you end up having path like this:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Wow6432Node\XnView\Capabilities\FileAssociations

I'm not sure if Inno setup supports writing in 64-bit registry. So it might not be easy.

Though, I find it odd that Windows doesn't check both 32-bit and 64-bit registry views for these keys.

@ckit
Did you only change the the XnView.bmp ProgID entries or did you change other entries as well to get it work?

@Pierre
Do you plan to add more associations to Default Program? Ideally all supported file types should be added, but I think at least the most used file types.

--
Clo wrote:• You ought write the parenthesis (decimal 40 - 41) as %hexa-code like :
http://msdn.microsoft.com/en-us/library ... 85%29.aspx.
- Same for all other upper ASCI characters…
Right, that's the standard way such urls should be presented. Too bad Microsoft gives middle finger for web standards. :x

MSDN urls also seems to work without the (VS.85) part. :o
ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Post by ckit »

I changed each of the "string" values in the screenshot except for the XnView.bmp one which was correct....

Image

BTW, I'm finished with ImageShack (useless now days), just started using ImageHosting.com which is much better.
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys