-
June 9th, 2016, 07:59 AM
#1
Changing the icon for an exe file (in Windows Explorer)
I've spent an entire morning searching the internet but amazingly, I can't find an answer to this...
For the past few years I've been using MSVC to compile an particular program periodically. The exe contains an icon and if I navigate to the folder that contains the exe (in Windows Explorer) obviously I see the icon.
But yesterday, the icon got changed and I had to re-compile the program. I linked the new icon into it but strangely, Windows Explorer still displays it with the older icon. I downloaded a product called IconViewer and used it to examine my newly built exe. Sure enough, it only contains the new icon. And if I create a shortcut to the exe, the shortcut gets created with the new icon - but for the exe itself, Windows Explorer stubbornly carries on displaying the old icon and I can't find any way to update it. Even deleting the exe and totally rebuilding it still leaves Explorer displaying the old icon.
Any ideas anyone..?
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
June 9th, 2016, 11:26 PM
#2
Re: Changing the icon for an exe file (in Windows Explorer)
-
June 10th, 2016, 05:39 AM
#3
Re: Changing the icon for an exe file (in Windows Explorer)
Thanks Arjay,
The only thing that seemed relevant there was the advice on how to change the icon for an (already running) program by selecting it from the Windows taskbar. However, that didn't seem to work for me. If the program got started from a shortcut, those instructions did change the icon for the relevant shortcut - but I haven't yet found any simple way to change the icon for an actual exe file. Once Windows has decided on the icon, you're pretty much stuck with it AFAICT.
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
June 10th, 2016, 12:04 PM
#4
Re: Changing the icon for an exe file (in Windows Explorer)
Originally Posted by John E
Thanks Arjay,
The only thing that seemed relevant there was the advice on how to change the icon for an (already running) program by selecting it from the Windows taskbar. However, that didn't seem to work for me. If the program got started from a shortcut, those instructions did change the icon for the relevant shortcut - but I haven't yet found any simple way to change the icon for an actual exe file. Once Windows has decided on the icon, you're pretty much stuck with it AFAICT.
Search the registry for the exe name. You should see in entry related to the icon (it's an ordinal into the exe).
-
June 21st, 2016, 12:34 PM
#5
Re: Changing the icon for an exe file (in Windows Explorer)
An interesting development this afternoon...
I happen to be compiling the exe onto a removable drive. So I decided to attach the drive to some different OS's. Guess what... Windows XP, Windows 7 and Windows 10 all see the correct icon. Only Windows 8.1 continues to display the out-of-date version.
So it looks like this is just a bug in Windows 8.1
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
June 21st, 2016, 12:59 PM
#6
Re: Changing the icon for an exe file (in Windows Explorer)
So it looks like this is just a bug in Windows 8.1
Upgrading to Windows 10 from Windows 8/8.1 is really a no-brainer and there's still time to do it for free...
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
July 13th, 2016, 04:29 AM
#7
Re: Changing the icon for an exe file (in Windows Explorer)
I think there has several bugs in 8.1. Many of them are corrected in windows 10
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|