| Jc1991 Profil: New Penguin | How does IconTweaker work, from a technical point of view? Is there a function in the Windows API that allows for changing icons without modifying the default icon files, or something else? | |
TheVestel PHP Programmer Profil: Big Penguin | If you take a look at the IconTweaker installation directory, you should see a folder called Data. This folder contains 8 XML files (cursors.xml, desktop.xml, drives.xml, files.xml, folders.xml, network.xml, other.xml and start.xml). Each folder contains data for your current icons. Also, as you can see when you start IconTweaker, there are 8 tabs. So when you change an icon in IconTweaker it changes your icon directory in one of your XML files too. And I think Windows then knows where too find the icons. (I guess all original Windows icons are still somewhere on your computer... maybe the WINDOWS directory). Btw each XML file in the Data directory looks like this: CODE<ClosedFolder> <itd:DisplayName>Closed Folder</itd:DisplayName> <itd:DefaultIcon> <itd:All>%System%\shell32.dll,3</itd:All> </itd:DefaultIcon> <itd:RegKey> <itd:All>3</itd:All> </itd:RegKey> <itd:RegType> <itd:All>ShellIcon</itd:All> </itd:RegType> </ClosedFolder> | |
Jc1991 Profil: New Penguin | Most (but not all, which is often very annoying) default Windows icons are inside of shell32.dll, in Windows\System32. IconTweaker doesn't modify this file, but it must be modifying some Windows system file because modifications to icons persist after uninstallation and because even if it was storing icon information itself, it would have to tell Windows were to look for the information somehow. | |
TheVestel PHP Programmer Profil: Big Penguin | I think Windows just 'knows' some icons are also stored in the IconTweaker/Data directory too, so it doesn't load them via shell32.dll. I hope you understand this?  | |
Jc1991 Profil: New Penguin | To clarify my last post: I've uninstalled IconTweaker, which leads me to believe that Windows stores icon information somewhere other than the IconTweaker data folder (which no longer exists). The same effect can be achieved by enabling the generic "Internet" link on your XP Start Menu, and then installing Firefox: the Internet Explorer icon is replaced by a Firefox icon (the default "Internet" icon is stored in iexplorer.exe, which is not altered when Firefox is installed). | |
poiru Profil: Moderator | Jc1991 wrote :
To clarify my last post: I've uninstalled IconTweaker, which leads me to believe that Windows stores icon information somewhere other than the IconTweaker data folder (which no longer exists). The same effect can be achieved by enabling the generic "Internet" link on your XP Start Menu, and then installing Firefox: the Internet Explorer icon is replaced by a Firefox icon (the default "Internet" icon is stored in iexplorer.exe, which is not altered when Firefox is installed).
|
The generic Internet link changes according to the default browser. When you set FF as the default browser, it probably changes a registry key, which then causes the generic link to change.. But of IconTweaker, I am not sure.. | |
Breakfastclub Profil: Penguin Pro | Jc1991 wrote :
To clarify my last post: I've uninstalled IconTweaker, which leads me to believe that Windows stores icon information somewhere other than the IconTweaker data folder (which no longer exists).
|
I`m not sure if you mean this ? Windows stores icons in a database called "Iconcache.db". It`s possible that you customize some icons but they don`t change, thats why windows use the "Iconcache" and don´t read in all new icons. You can refresh the icon cache by deleting the IconCache.db file from your profile directory (usually C Documents and Settings/Username/Local Settings/Application Data - it`s a hidden file/folder). Windows will create a new file. Microsofts TweakUI do the same. Download TweakUI (from Microsoft, right side), install it and at the bottom you have the option "REPAIR", chose repair icons (reboot) ... | |
Dark_RAIDEN_ Profil: Big Penguin | yeh i agree, tweakui will do it all | |
codenamem2k Profil: Big Penguin | Yeah TweakUI does work cool!!  | |
TheVestel PHP Programmer Profil: Big Penguin | I don't think both of your comments add any value of discussion to this thread  | |
Jc1991 Profil: New Penguin | Quote :
Windows stores icons in a database called "Iconcache.db". It`s possible that you customize some icons but they don`t change, thats why windows use the "Iconcache" and don´t read in all new icons.
|
To clarify: the new icons remain altered after I uninstall IconTweaker. I've manually removed both IconCache.db and the local thumbs.db several times in the course of modifying shell32.dll (and explorer.exe, which for some inexplicable reason contains the "My Computer" icon) to no effect.
| |
Breakfastclub Profil: Penguin Pro | There are 2 reasons when you change/edit systemfiles but they don`t change the icons, first is the iconcache.db, Windows always use the Iconcache (often changes at the system will not displayed because Windows use an old iconcache). Second, your customized systemfile will be overwritten by the system (Prefetch-folder, DLL-Cache, System File Protection). When you change some icons/dlls/exe - refresh your iconcache | |
Jc1991 Profil: New Penguin | Quote :
There are 2 reasons when you change/edit systemfiles but they don`t change the icons, first is the iconcache.db, Windows always use the Iconcache (often changes at the system will not displayed because Windows use an old iconcache). Second, your customized systemfile will be overwritten by the system (Prefetch-folder, DLL-Cache, System File Protection). When you change some icons/dlls/exe - refresh your iconcache.
|
I'm perfectly aware of all of that: I'm not having trouble changing icons, I'm having trouble figuring out how IconTweaker changes icons without altering the underlying system files.
| |
poiru Profil: Moderator | Jc1991 wrote :
I'm perfectly aware of all of that: I'm not having trouble changing icons, I'm having trouble figuring out how IconTweaker changes icons without altering the underlying system files.
|
Here is an example.. [I am not sure that IconTweaker works like this - just a theory] The my computer icon is determined by a registry key: HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon On that key, the "Default" string has a value of "icon_file_name,icon_number" - for example: explorer.exe,0 Now, when IconTweaker changes those values, the my computer icon changes. Again, I am not sure if IconTweaker works this way.. Each system icon has a registry value. By changing that value, the icon changes. For example, my HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Current Version\Explorer\Shell Icons looks like this: ssdad.PNG So, I guess it works so, that if you want to assign a custom icon to a specific system icon, you need to add a registry value (if the specific registry value for a specific icon does not work, it uses the default icon.. As you can see from the image above, the strings in Explorer\Shell Icons has a number (e.g. 29). From the list below, you can see which number you need to add to assign a specific icon to something.. E.g. if you add number 8 and the string to explorer.exe,0, the hard disk icon will change to the My Computer icon. CODE 0 (Explorer) Unknown File Type 1 (Explorer) Default Document 2 (Explorer) Default Application 3 (Explorer) Closed Folder 4 (Explorer) Open Folder 5 (Drive) 5.25 inch floppy 6 (Drive) 3.5 inch floppy 7 (Drive) Removable Drive 8 (Drive) Hard Drive 9 (Drive) Network Drive 10 (Drive) Network Drive disconnected 11 (Drive) Cd-ROM Drive 12 (Drive) RAM Drive 13 Entire network (globe) 14 ?? 15 (Explorer) Networked Computer 16 (Explorer) Printer(s) 17 (Desktop) Network Neighborhood 18 (Explorer) Workgroup 19 (Startmenu) Programs 20 (Startmenu) Recent documents 21 (Startmenu) Settings 22 (Startmenu) Find 23 (Startmenu) Help 24 (Startmenu) Run 25 (Startmenu) Suspend 26 (Startmenu) Docking 27 (Startmenu) Shutdown 28 (Overlay) Sharing 29 (Overlay) Shortcut 30 (Overlay) ?? 31 (Desktop) Recycle bin empty 32 (Desktop) Recycle bin full 33 (Explorer) Dial-up Networking 34 (Explorer) Desktop 35 (Startmenu) Settings/Control Panel 36 (Startmenu) Programs/Program folder 37 (Startmenu) Settings/Printers 38 ?? 39 (Startmenu) Settings/Taskbar 40 (Explorer) Audio CD 42 (Explorer) Saved search (.fnd) 43 (Explorer & Startmenu) Favorites 44 (Startmenu) Log Off SOURCE: http://www.virtualplastic.net/html/icn_reg.html I hope this clears things up  | |
Jc1991 Profil: New Penguin | Interesting. I've done some experimenting with the Shell Icons keys before, and they seem to have very limited control over icon specification (and there appear to be differences between versions of XP, and possibly between installations of the same version), but I was unaware of the HKEY_CLASSES_ROOT keys. (Is there any documentation of the registry system in its entirety, official or not?) Thanks for the information, I'll have to do some more experimenting. | |
poiru Profil: Moderator | Jc1991 wrote :
Interesting. I've done some experimenting with the Shell Icons keys before, and they seem to have very limited control over icon specification (and there appear to be differences between versions of XP, and possibly between installations of the same version), but I was unaware of the HKEY_CLASSES_ROOT keys. (Is there any documentation of the registry system in its entirety, official or not?) Thanks for the information, I'll have to do some more experimenting.
|
http://www.virtualplastic.net/html/icn_reg.html That site contains a lot, and I'm sure you can find more with Google  | |
| |