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: 358
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: 44895
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: 358
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: 44895
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: 358
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: 44895
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: 2003
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: 2003
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 associations via SetUserFTA, application developed by Christoph Kolbicz (he reverse engineered hash generation)

example for XnViewMP*:
SetUserFTA.exe xnAssociations.txt

xnAssociations.txt

Code: Select all

.arw, XnViewMP.arw
.avif, XnViewMP.avif
.bmp, XnViewMP.bmp
.cr2, XnViewMP.cr2
.crw, XnViewMP.crw
.dds, XnViewMP.dds
.dng, XnViewMP.dng
.emf, XnViewMP.emf
.gif, XnViewMP.gif
.heic, XnViewMP.heic
.icns, XnViewMP.icns
.ico, XnViewMP.ico
.iff, XnViewMP.iff
.img, XnViewMP.img
.jfif, XnViewMP.jfif
.jif, XnViewMP.jif
.jp2, XnViewMP.jp2
.jpc, XnViewMP.jpc
.jpe, XnViewMP.jpe
.jpeg, XnViewMP.jpeg
.jpg, XnViewMP.jpg
.jxl, XnViewMP.jxl
.nef, XnViewMP.nef
.pbm, XnViewMP.pbm
.pcd, XnViewMP.pcd
.pcx, XnViewMP.pcx
.pef, XnViewMP.pef
.pgm, XnViewMP.pgm
.pic, XnViewMP.pic
.png, XnViewMP.png
.ppm, XnViewMP.ppm
.psd, XnViewMP.psd
.raf, XnViewMP.raf
.ras, XnViewMP.ras
.rle, XnViewMP.rle
.srf, XnViewMP.srf
.tga, XnViewMP.tga
.tif, XnViewMP.tif
.tiff, XnViewMP.tiff
.webp, XnViewMP.webp
.wmf, XnViewMP.wmf
.xbm, XnViewMP.xbm
.xpm, XnViewMP.xpm
* as far as I remember XnViewMP does not create XnViewMP.jfif and XnViewMP.avif keys for some reason,
so you need to create them before running this tool.
Last edited by user0 on Wed Jul 31, 2024 6:55 pm, edited 1 time in total.
Tetsuoo
Posts: 13
Joined: Tue Sep 19, 2023 10:20 pm

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

Post by Tetsuoo »

I had issues launching XnView MP from Windows Explorer with any type of image file, SetUserFTA saved the day using your example. Thank you :)
(I'm going to put that into a BAT file so next time I need that trick I won't need to search in the forum again xD )

Note: I'm using Windows 10 21H2 and using the settings didn't work; this trick is easier anyway
kimi
Posts: 38
Joined: Sat Apr 23, 2011 4:52 pm

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

Post by kimi »

xnview wrote: Thu Jun 22, 2023 1:02 pm
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
Hi Pierre, I agree with you about the hassle of file type associations on Windows 10 and 11. However, there are still some well-known programs accomplishing bulk file type associations using their on settings menu on Windows 10/11, such as WinRAR. Can you make comments on that in order to make the same with XnView?
User avatar
j7n
Posts: 19
Joined: Tue Mar 03, 2020 7:28 am

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

Post by j7n »

There appears to be list of protected extensions. On a new Windows installation the ".bmp" extension cannot be changed, but ".reg" can be changed normally. Have people found where this list is to hack it?

Edit: On Server 2022 only these extensions are protected. Strangely, some important ones like EXE are not. Many image extensions like PSD DDS are not on the list, and neither is RAR and 7Z.

.3g2 .3gp .3gp2 .3gpp .aac .adt .adts .avi .bmp .dib .flac .gif .htm .html .jfif .jpe .jpeg .jpg .m2t .m2ts .m3u .m4a .m4v .mkv .mod .mov .MP2 .mp3 .mp4 .mp4v .mpa .MPE .mpeg .mpg .mpv2 .mts .pdf .png .tif .tiff .TS .TTS .txt .url .wav .website .wm .wma .wmv .WPL

I have deleted/renamed OEMDefaultAssociations.dll‎‎
Removed the Deny permission and then deleted all subkeys from HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
On later builds there is also a driver service HKLM\SYSTEM\CurrentControlSet\Services\UCPD (start := 4)