BUG: Can't set file type associations in XnView...

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, helmut, xnview

ghost zero
Posts: 357
Joined: Mon Feb 05, 2007 8:26 pm

BUG: Can't set file type associations in XnView...

Post by ghost zero »

Image

We can't set file type associations in XnView, the options are grayed out. It works fine on Win7 but not on Win11. Normally, I want to click the "the most used" button option. Please fix.
User avatar
xnview
Author of XnView
Posts: 41871
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: BUG: Can't set file type associations in XnView...

Post by xnview »

you need to use associations in windows settings
Pierre.
ghost zero
Posts: 357
Joined: Mon Feb 05, 2007 8:26 pm

Re: BUG: Can't set file type associations in XnView...

Post by ghost zero »

but it is a big hassle to have to manually set associations in windows settings. can you fix it to make the xnview association options work in win11, to be more convenient? normally, i want to simply click the "the most used" button option.
User avatar
xnview
Author of XnView
Posts: 41871
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: BUG: Can't set file type associations in XnView...

Post by xnview »

ghost zero wrote: Tue Jun 20, 2023 7:34 pm but it is a big hassle to have to manually set associations in windows settings. can you fix it to make the xnview association options work in win11, to be more convenient? normally, i want to simply click the "the most used" button option.
It's no more possible
Pierre.
ghost zero
Posts: 357
Joined: Mon Feb 05, 2007 8:26 pm

Re: BUG: Can't set file type associations in XnView...

Post by ghost zero »

why isn't it possible?
User avatar
xnview
Author of XnView
Posts: 41871
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: BUG: Can't set file type associations in XnView...

Post by xnview »

Since Windows 10, it's not more possible from windows api
Pierre.
Darknight
Posts: 2
Joined: Sun Jun 25, 2023 7:07 pm

Re: BUG: Can't set file type associations in XnView...

Post by Darknight »

Is it possible to make an Export and Import Custom Default App Associations like this:
https://www.elevenforum.com/t/export-an ... s-11.5305/

?
User avatar
user0
XnThusiast
Posts: 1116
Joined: Sat May 09, 2015 9:37 am

Re: BUG: Can't set file type associations in XnView...

Post by user0 »

looks like a solution for MP as well
Darknight
Posts: 2
Joined: Sun Jun 25, 2023 7:07 pm

Re: BUG: Can't set file type associations in XnView...

Post by Darknight »

Unfortunately it doesn't work. I tested. :(
The answer to why is here: https://www.dedoimedo.com/computers/win ... assoc.html

"From Windows 10 20H2, none of these solutions really work for an existing user. If you want to make changes, you can, except, the system will totally ignore them. Moreover, Windows now also assigns a hash to any program & file association, and this hash is used to verify that the change is legit, i.e., done by the user. So you can't really go about manually mucking through the registry, because Windows will ignore your manual changes, as they won't match the hash. How is the hash computed, beats me."
User avatar
user0
XnThusiast
Posts: 1116
Joined: Sat May 09, 2015 9:37 am

Re: BUG: Can't set file type associations in XnView...

Post by user0 »

its possible to set assosiations via SetUserFTA (guy reverse engineered hash generation), unfortunately no source code available

example for xnViewMP:
SetUserFTA.exe xnAssociations.txt

xnAssociations.txt

Code: Select all

.ico, XnViewMP.ico
.icns, XnViewMP.icns
.jpg, XnViewMP.jpg
.jif, XnViewMP.jif
.jpeg, XnViewMP.jpeg
.bmp, XnViewMP.bmp
.emf, XnViewMP.emf
.gif, XnViewMP.gif
.jp2, XnViewMP.jp2
.jpc, XnViewMP.jpc
.pcx, XnViewMP.pcx
.png, XnViewMP.png
.psd, XnViewMP.psd
.tga, XnViewMP.tga
.tif, XnViewMP.tif
.tiff, XnViewMP.tiff
.webp, XnViewMP.webp
.wmf, XnViewMP.wmf
.jxl, XnViewMP.jxl
.heic, XnViewMP.heic
.jpe, XnViewMP.jpe
.crw, XnViewMP.crw
.nef, XnViewMP.nef
.raf, XnViewMP.raf
.cr2, XnViewMP.cr2
.arw, XnViewMP.arw
.dng, XnViewMP.dng
.pef, XnViewMP.pef
.srf, XnViewMP.srf
.pic, XnViewMP.pic
.iff, XnViewMP.iff
.dds, XnViewMP.dds
.img, XnViewMP.img
.pbm, XnViewMP.pbm
.pcd, XnViewMP.pcd
.pgm, XnViewMP.pgm
.ppm, XnViewMP.ppm
.ras, XnViewMP.ras
.rle, XnViewMP.rle
.xbm, XnViewMP.xbm
.xpm, XnViewMP.xpm
ps. as far as I remember there is no XnViewMP.jfif hive for some reason, so you need to create it and than add .jfif, XnViewMP.jfif to the config above