Of course, there is no simple solution, since your application when opening the folder with the explorer should automatically provide it with some icon that it will draw.
Accordingly, a simple way is to store any icon before the first launch, and after the first start patch your fragment .exe
, where the icon resource is sewn up, replacing it with the necessary one.
A difficult way is to hang the global hook on the corresponding call to get the icon (ready to admit that it may have to be sniffed at the Native API
level) and again, on the fly, patch the resource, demonstrating the icon you need. In this way, even for the first time, the icon will be displayed correctly.
In general, the task is interesting, but, naturally, no one in their right mind would be engaged in this :)