B4J Question (SOLVED) Program Icon resets to default

BlueVision

Active Member
Licensed User
Longtime User
The following problem is only a "cosmetic problem" that I noticed when I sent the build of my app to the beta testers.
I have put appropriate instructions in the MAIN for the packager:
B4X:
#Region Project Attributes
    #PackagerProperty: IconFile = C:\B4J\Projects\Shark\B4J\Files\shark.ico
    #PackagerProperty: ExeName = Shark
This works on my computer. After creating the package, the BUILD directory opens in the TEMP folder with the files for the distribution of the app. There I can see the icon file and the EXE file has the assigned icon. I pack the contents of this folder with ZIP and get the file "Build.zip". This file can then be sent and unpacked on the target computer. There, however, the EXE file again has the "J" standard icon and not the icon I assigned.
What am I doing wrong? Does anyone have a tip? Does it perhaps work better with INNO (I have never tried this, as the code changes daily and is sent out again anyway).
 

BlueVision

Active Member
Licensed User
Longtime User
I tried again today with a new build. Exactly the same problem. As I said, it's only cosmetic but somehow very annoying.
Either it's the ZIP (logical, that's why it's packed) or the clients are still missing something that is on my computer with the development environment and is not copied into the ZIP.
The EXE file is tiny. So I only copied this file via Bluetooth to a target computer. The EXE file still has the correct icon in the download folder of the target computer. If I then move the file to the correct folder, I am of course asked whether I want to replace the existing file. No sooner said than done. And at that very moment, the icon changes back into a "J".
Does Windows itself perhaps somehow notice something here and spit in my soup? Is it possible that the EXE itself is registered in some way under Windows because of its name and that is why the icon is always "destroyed"? If I rename the EXE file and then copy it to the appropriate place, the EXE file keeps its icon. As soon as I give the EXE file the correct name again, the icon changes.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
I tried again today with a new build. Exactly the same problem. As I said, it's only cosmetic but somehow very annoying.
Either it's the ZIP (logical, that's why it's packed) or the clients are still missing something that is on my computer with the development environment and is not copied into the ZIP.
The EXE file is tiny. So I only copied this file via Bluetooth to a target computer. The EXE file still has the correct icon in the download folder of the target computer. If I then move the file to the correct folder, I am of course asked whether I want to replace the existing file. No sooner said than done. And at that very moment, the icon changes back into a "J".
Does Windows itself perhaps somehow notice something here and spit in my soup? Is it possible that the EXE itself is registered in some way under Windows because of its name and that is why the icon is always "destroyed"? If I rename the EXE file and then copy it to the appropriate place, the EXE file keeps its icon. As soon as I give the EXE file the correct name again, the icon changes.
As Erel said that it just is icon cache issue, mostly reboot computer it will work.
 
Upvote 0

BlueVision

Active Member
Licensed User
Longtime User
It is definitely. It is correct now after the 4th cold reboot (Windows11)...
Problem is solved.
Thank you all!
 
Upvote 0
Top