Windows – Change default icon for “.exe” and “unknown” filetypes on Windows 7

windows 7

I have looked all over the place with no success.

I'm wondering how I can change the default icon that windows shows when an exe file does not have an icon contained within it. I am also trying to change the icon that appears when windows doesn't recognize a file extension. Please note that I am not looking for a way to change an icon in an exe file.

I have looked in the registry HKCR and HKCU\Software\Classes with no success.

Also, Windows 7 claims to be using the first icon in shell32.dll for unknown file types, but the icon in shell32.dll doesn't match the icon that windows 7 displays.

Any help would be much appreciated!

EDIT: I found out that the icons are located in imageres.dll. I haven't looked through the registry yet to see if it's referenced anywhere.

EDIT 2: Thanks to the information provided by jay, I decided to change the DefaultIcon key for the Unknown file type to another icon file, and Explorer displayed the icon I specified! Apparently, Windows replaces references to icons in the shell32.dll file with icons from imageres.dll. Also, as far as I know, the default icon for exe files is not referenced in the registry and is hard coded into a system dll file.

Best Answer

Theming and skinning software simply resource hack these kinds of files. I recommend against changing system files as their versions may be different, may cause all kinds of problems and windows update may change them anyway.

You can use Resource Hacker to change resources. Note I last used this in the early 00's so perhaps there's something more modern now. You can also find replacement files on skinning communities like DeviantArt, take this (custom imgres.dll file):

custom images

I don't think there are references in the registry that you can easily modify to change the default icons, hence people hacking these DLLs. But interestingly (as per my comments) I noted that on Vista and above versions of Windows, any reference to the XP themed icons in shell32.dll seems to be visually automatically be overridden by the ones from imgres (perhaps some kind of enforcement of platform file icon consistency).

Again, I'd like to say that it's not recommend to modify system files, especially replace them with ones off the Internet!

Related Question