seeking to add an icon to .exe

Started by pguild, February 03, 2021, 01:07:36 PM

Previous topic - Next topic

pguild

I am seeking to add an icon to a Winbatch script COMPILED to a .exe
I have done this for years; it used to work well. As far as I know, I am doing everything RIGHT. 8)
I am even using an icon supplied by Winbatch -- see attachment.
But so far all I get is a blank looking icon.  :-\  -- see attachment.
www.DogTrainingPsychology.com -- "Don't wish it were easier, wish you were better."  as aphorism by Jim Rohn as quoted in the Kindle Book, GEMS OF WISDOM by Philip Seyer

td

Don't know what to tell you.  I tried compiling a script using the same icon you indicate and all worked as it should. The exe file has an icon image when viewed from a Windows Explore shell window. The only thing that comes to mind is that the OS is deciding not to use an icon in the set because of some combination of screen pixel resolution, DPI scaling, and other system settings but that seems like a remote possibility.  I have high pixel resolution monitors and the icons are still displayed on my system. 

The icons shipped with WinBatch are better suited for low pixel resolution displays but you mentioned that you have your own icon files that I assume are suited for your monitor resolution anyway.  FWIW, If you need to edit or create your icons for some reason, there are several Web-based, free applications available.  If you search this forum you should be able to find a link to at least one of them.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

After ruminating on this problem for a few days a 10 or so year old memory of some previous occurrence of it filtered its way through the fog. Not sure if this applies to your version of the problem but it is worth a try.  You can find a how-to to fix the Windows Explorer shell's icon cache by following the link below:

https://www.howtogeek.com/232779/how-to-rebuild-a-broken-icon-cache-in-windows-10/
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

pguild

Thanks so much for your help. 😃 I also had all icons disappear recently and used the method describe here to fix them.
https://softwarekeep.com/help-center/how-to-fix-the-desktop-icons-disappeared-on-windows-10
www.DogTrainingPsychology.com -- "Don't wish it were easier, wish you were better."  as aphorism by Jim Rohn as quoted in the Kindle Book, GEMS OF WISDOM by Philip Seyer