viewpoint-particle

Author Topic: seeking to add an icon to .exe  (Read 154 times)

pguild

  • Newbie
  • *
  • Posts: 43
  • The dog is always right!
    • MasteryLearning
seeking to add an icon to .exe
« on: February 03, 2021, 01:07:36 pm »
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.

td

  • Tech Support
  • *****
  • Posts: 3702
    • WinBatch
Re: seeking to add an icon to .exe
« Reply #1 on: February 03, 2021, 02:08:01 pm »
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

  • Tech Support
  • *****
  • Posts: 3702
    • WinBatch
Re: seeking to add an icon to .exe
« Reply #2 on: February 05, 2021, 09:24:34 am »
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

  • Newbie
  • *
  • Posts: 43
  • The dog is always right!
    • MasteryLearning
Re: seeking to add an icon to .exe
« Reply #3 on: March 27, 2021, 12:48:15 am »
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