Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Custom icon when application installed in "C:\Program Files\MyApp" under Windows

48 views
Skip to first unread message

pbrun...@gmail.com

unread,
Feb 17, 2018, 12:09:39 PM2/17/18
to
I am not a Tcl/Tk developer, but I have an application developed by someone else that I would like to install in “C:\Program Files\MyApp” on my Windows 10 machine. I created the folder manually, copied the required files and all is good… except the icon of the application on the taskbar when I run the application. Instead of the icon the developer created for his application, I see the default feather icon. Oddly enough, if I move the application to another folder, say in My Documents somewhere, the icon is the intended icon instead of the feather. I contacted the developer, but he is not quite sure what could be the problem. Are there known limitations or security features of Windows that forces the Tcl/Tk feather icon when exe is ran from one of Windows’ program files folders?

Harald Oehlmann

unread,
Feb 18, 2018, 8:44:28 AM2/18/18
to
Am 17.02.2018 um 18:09 schrieb pbrun...@gmail.com:
> I am not a Tcl/Tk developer, but I have an application developed by someone else that I would like to install in “C:\Program Files\MyApp” on my Windows 10 machine. I created the folder manually, copied the required files and all is good… except the icon of the application on the taskbar when I run the application. Instead of the icon the developer created for his application, I see the default feather icon. Oddly enough, if I move the application to another folder, say in My Documents somewhere, the icon is the intended icon instead of the feather. I contacted the developer, but he is not quite sure what could be the problem. Are there known limitations or security features of Windows that forces the Tcl/Tk feather icon when exe is ran from one of Windows’ program files folders?
>

I can say, I have a custom icon in both situations, so it is doable.
It might be tricky and might also depend on the icon file and its
included resolutions.

But please write more how the icon is set.

Thank you,
Harald

pbrun...@gmail.com

unread,
Feb 18, 2018, 7:38:03 PM2/18/18
to
> But please write more how the icon is set.

Like I said, I am not the original developer, so it is hard for me to give more details about how the icon is set. However, I was able to solve the issue myself and find two things.

For one, it is not the fact that I put the EXE in the "Program Files" folder that made Windows show the feather icon; it is because I also added a shortcut to the application in the Windows 10 Start Menu, causing Windows to retrieve the feather icon. Removing the application from the Start Menu would restore the correct icon.

For two, I also found out using Resource Hacker, that the embedded icon in the EXE had various sizes (16x16, 32x32 and 48x48) but that there was also a large feather icon of 256x256. I deleted the large feather icon and it completely solved my issue. It looks like Windows, for the Start Menu, favoured the 256x256 icon and therefore picked this from the EXE.

Harald Oehlmann

unread,
Feb 19, 2018, 7:46:52 AM2/19/18
to
That is good news.
Congratulations,
Harald

Torsten

unread,
Feb 19, 2018, 1:12:16 PM2/19/18
to
It's me, the developer of that app ;-)

Meanwhile I found the root cause: I'm using tclkits and sdx to replace the icons. sdx replaces the icons up to 48x48 pixel, but not the (newer?) icons with 256x256 pixel. Even if they are present in the replacement .ico file. Using "Resource Hacker" (great tip!) I was able to replace all icons directly in the tclkit.exe without sdx and it works fine. I'm going to update the app later this evening.
0 new messages