this post was submitted on 25 Aug 2023
19 points (88.0% liked)
No Stupid Questions (Developer Edition)
936 readers
1 users here now
This is a place where you can ask any programming / topic related to the instance questions you want!
For a more general version of this concept check out [email protected]
Icon base by Lorc under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
What /u/[email protected] mentioned - that's correct. But to elaborate: The icon image isn't simply stored as an image, but kinda complex (out of scope to explain the whole concept, but you can read more about it here
What windows does the first time it comes across a new .exe, is extract the image, because this is an "expensive" process, it's optimized to not do this every time, and instead the extracted image is dumped into
C:\Users\%username%\AppData\Local\Microsoft\Windows\Explorer
in one of the iconcache.db files.When you recompile an exe with the same name but will a new icon, it will actually have a new icon, it's just not shown, because the old icon is retrieved from the iconcache.db. You can get around this by deleting all your iconcache.db files
Also, even if you compile from the console, you can usually still specify an icon on compile time, and don't really have to inject it later after compiling. But of course that depends on the language / compiler on how you'd have to do that