Changing associated icons?

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
tb238

Changing associated icons?

Post by tb238 »

I'm trying XnView for the first time and so far I like it. I associated image files with it, but I don't like the icons XnView uses, so I want to restore Windows XP's. How can I do that? Image files don't show up anymore in the File types tab in Explorer > Tools > Folder options.

I was going to just replace the icons in XnView.exe's resources, but it's protected. What protection is it using?

So I went to the registry, HKEY_CLASSES_ROOT\.png to name one key, but nothing shows up in the default value. What weird method is XnView using for file associations? :|

Thanks.
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France
Contact:

Yep !

Post by Clo »

:) Hello !

- You can assign any icon to any file type in Windows >> Configuration Panel >> Tools Menu >> Folders options >> File Types >> Advanced >> Change icon (or so, it's in French here…)
The most Win icons are contained in <windows\system32\Shell32.dll> and also in some EXEs of the original programmes used by Windows.
I was going to just replace the icons in XnView.exe's resources, but it's protected. What protection is it using?
:shock: Do you think really that Pierre should give you means to hack the programme ?
- However, a feature allowing to use another external icon-set is missing and has been requested IIRC…
- Currently, you must change the icons for the image-types one by one…

:mrgreen: Kind regards,
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Changing associated icons?

Post by helmut »

tb238 wrote:...
So I went to the registry, HKEY_CLASSES_ROOT\.png to name one key, but nothing shows up in the default value. What weird method is XnView using for file associations? :|
A minor addition to Clo's good answer: XnView does nothing weird. There is one key which is points to an alias that's all.

If you want to change the icon for PNG for example, you can change it as described by Clo or reg-editing "HKEY_CLASSES_ROOT\XnView.png\DefaultIcon" (HKEY_CLASSES_ROOT\.png points to .\XnView.png).
tb238

Re: Changing associated icons?

Post by tb238 »

Clo wrote:- You can assign any icon to any file type in Windows >> Configuration Panel >> Tools Menu >> Folders options >> File Types >> Advanced >> Change icon (or so, it's in French here…)
The most Win icons are contained in <windows\system32\Shell32.dll> and also in some EXEs of the original programmes used by Windows.
I know, check my first post. I was saying that all the image formats I associated with XnView don't show up anymore in that list. I figured out why, keep reading.

Clo wrote:
I was going to just replace the icons in XnView.exe's resources, but it's protected. What protection is it using?
:shock: Do you think really that Pierre should give you means to hack the programme ?
It's not hacking, it's just replacing its resources. The program is free for non-commercial use anyway, why is the protection needed?

helmut wrote:
tb238 wrote:...
So I went to the registry, HKEY_CLASSES_ROOT\.png to name one key, but nothing shows up in the default value. What weird method is XnView using for file associations? :|
A minor addition to Clo's good answer: XnView does nothing weird. There is one key which is points to an alias that's all.

If you want to change the icon for PNG for example, you can change it as described by Clo or reg-editing "HKEY_CLASSES_ROOT\XnView.png\DefaultIcon" (HKEY_CLASSES_ROOT\.png points to .\XnView.png).
OK, thanks. Stupid me for forgetting about HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png.

And sorry, by "weird" I didn't mean XnView was doing something suspicious, I meant there was something wrong.

This is the problem:
HKCR\.png does not point to HKCR\.XnView.png at all, but HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png does. "XnView.png" should be added to HKCR\.png as the default value, so that PNG shows up again in Explorer's file type list. Bug?

Well, thanks for responding, XnView looks really great :)
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France
Contact:

Authors' Rights...

Post by Clo »

:arrow: tb238

• Even if XnView is free of charge for a personal use, nobody has rights to modify the program itself, it's not under Public GNU Licence" like in some countries. This is a French program to which the French "Authors' Rights" laws are applied, and these laws do not allow that you tell; let notice that these laws are more protecting than the universal ©, because they continue to be valid after the author died (normally for for 50 years or even 70 years in some cases). The normal © values *peanuts* in France, it's not recognized.
- XnView has it too, though, because it's used worldwide…

- Just for information…

:mrgreen: KR
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow
Contact:

Re: Changing associated icons?

Post by ckv »

tb238 wrote:
Clo wrote:
tb238 wrote:I was going to just replace the icons in XnView.exe's resources, but it's protected. What protection is it using?
:shock: Do you think really that Pierre should give you means to hack the programme ?
It's not hacking, it's just replacing its resources. The program is free for non-commercial use anyway, why is the protection needed?
tb238 I don't blame you, I do it too. XnView is packed with Aspack (at least the older versions was) so it's possible to unpack it, but not modify the resources.

And Clo don't sweat it, who cares if you don't ever relese anywhere those own "improved" versions (nobody haves to know). And tb238 is right it's far from hacking.

A ha hahaha 200
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Changing associated icons?

Post by helmut »

ckv wrote:...
And Clo don't sweat it, who cares if you don't ever relese anywhere those own "improved" versions (nobody haves to know). And tb238 is right it's far from hacking.
For XnView, there is no need to modify the executable. And if there is a need, this should be communicated here in the forum to see whether a good solution can be found.

In no case any changed XnView or NConvert package must be given to other people or put on download servers.
Katia
Posts: 2
Joined: Tue Jan 01, 2013 8:31 pm

Re: Changing associated icons?

Post by Katia »

Hello,

I have the same issue as the OP : I like the software, but would rather use the default Windows 7 icons associated to the different file types.
Clo wrote:a feature allowing to use another external icon-set is missing and has been requested IIRC…
Has this changed since 2005 ?

Else, I'll change icons back manually... The method to change default icons of file extensions is there. But does anyone know where the default icons for GIF, JPG, PNG and BMP files are ? Or even what they look like ? I just lost them, and yet can't remember them already !

Thanks and happy new year ! :)
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Changing associated icons?

Post by XnTriq »

Happy New Year, Katia! Welcome to the forum :-)
Katia wrote:
Clo wrote:a feature allowing to use another external icon-set is missing and has been requested IIRC…
Has this changed since 2005 ?
There's a FileIcons subdirectory in the installation folder of XnView MP, but I don't know whether or not Associate files with XnViewMP.exe assigns this icon-set automatically :?
For XnView v1.9, you can use ckv's (Unofficial) XnView file association manager.
Katia wrote:Else, I'll change icons back manually... The method to change default icons of file extensions is there. But does anyone know where the default icons for GIF, JPG, PNG and BMP files are ? Or even what they look like ? I just lost them, and yet can't remember them already !
  • Windows XP SP3
    • BMP: shimgvw.dll,1
      GIF: shimgvw.dll,2
      PNG: shimgvw.dll,2
      JPG: shimgvw.dll,3
    Windows 7
    • BMP: %SystemRoot%\system32\imageres.dll,-70
      GIF: %SystemRoot%\system32\imageres.dll,-71
      JPG: %SystemRoot%\system32\imageres.dll,-72
      PNG: %SystemRoot%\System32\imageres.dll,-83
Katia
Posts: 2
Joined: Tue Jan 01, 2013 8:31 pm

Re: Changing associated icons?

Post by Katia »

Thanks for the warm welcome and for the answer ! :)
XnTriq wrote:Windows 7
  • BMP: %SystemRoot%\system32\imageres.dll,-70
    GIF: %SystemRoot%\system32\imageres.dll,-71
    JPG: %SystemRoot%\system32\imageres.dll,-72
    PNG: %SystemRoot%\System32\imageres.dll,-83
Unfortunately, those numbers don't work for me. I have a Windows 7 Home Edition from France. And I can't even find the icons through Google ! Does one of you have an image of them ?

I didn't mention it in my first post, but I use XnView 1.99.5. Will ckv's XnView file association manager allow me to restore the default Windows 7 icons ? (I'm having trouble following the SevenForums tutorial that does it through the registry ; it seems I don't have the right headwords for .pdf files, for example... :?)
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Changing associated icons?

Post by XnTriq »

I'm not a Windows 7 user, so I rely on whatever information I find on the web :-|
These are the icons from imageres.dll:
  • Image
That's all I've got for now. I'll keep looking for better answers.
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Changing associated icons?

Post by XnTriq »

Katia wrote:Will ckv's XnView file association manager allow me to restore the default Windows 7 icons ?
If you've changed the associations with XFAM, you can restore the previous state.
xfam v1.2 ReadMe wrote:Two main modes

Xfam has two main modes: XnView compatible (default) and incompatible mode. Associations created in XnView compatible mode are compatible with XnView's own associations manager and associations created in incompatible mode will not show up in XnView's own associations manager.

[...]

Create XnView file associations

Creating new associations is designed so that xfam doesn't "steal" associations from other applications unless the user want to do so and even when association is replaced a backup will be created for the old association so it can be restored later on.

[...]

Custom icon set for file associations:
You can select custom file type icon set for the file associations. If this field is empty, default XnView file type icons are used.

If association already exist:
Action for case that the association already exist.

Never replace association - All existing association that are not created by xfam or XnView will not be replaced in any case.
Ask before replace - xfam will ask if the existing association should be replaced.
Always replace association - All existing associations will be replaced or updated.

Delete & restore file associations

Simply select all the associations from the list that you want to delete or restore.

Note: you can only delete associations what created by xfam or XnView.
Are these the correct icons?
XnTriq wrote:Image
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Changing associated icons?

Post by XnTriq »

The Windows Club ([url=http://www.thewindowsclub.com/file-association-fixer-for-windows-7-vista-released]File Association Fixer for Windows 7 & Vista Released[/url]) wrote:File Association Fixer detects whether you have Windows 7 or Windows Vista installed and accordingly offers you the relevant fixes only.
This freeware offers file association fixes for some of the most common file types. The app offers 18 file association fixes for Windows 7 & 26 file association fixes for Windows Vista.
PNG not included :-|
Post Reply