Archive: No EXE Icon in the task bar or menu

No EXE Icon in the task bar or menu

I have an odd situation.

I set an installer that download the application files from the web.
I compressed all the files into a 7z file, and after the installer download it I extract it into the application folder.

It work well, but with one exception.
When you run the application you don't see its icon in the task bar , nor in the OS menu.
Instead you see the default, white style OS icon.

When I include the application EXE within the installer it work perfect.

When I do the same with INNO (downloading the 7z file) and it work perfect.

When I extract the 7z manual, it work perfect.

So I assume its something with NSIS.

In order to extract the 7z file I use this command:

nsExec::Exec '"$PLUGINSDIR\7za.exe" e -y -o$\"$INSTDIR$\" $PLUGINSDIR\'

Than I use this command to create a shortcut
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\${APP_NAME}.lnk" "$INSTDIR\${APP_FILE_NAME}" "" "$INSTDIR\${APP_FILE_NAME}" 

I tried to set the icon in so many ways, nothing wrong.
The only thing that did the trick is to include the EXE file in the installer, which I try to avoid.

Does anyone has an idea why and how it can be fixed?

Thank you in advance

Is the icon missing only for the shortcut or is it missing for the .exe in $instdir? Make sure you put CreateShortcut "$SMPROGRAMS\$StartMenuGroup\${APP_NAME}.lnk" "$INSTDIR\${APP_FILE_NAME}" after the 7za extraction (You don't have to specify the shortcut icon)...

The icon is missing on both.
The shortcut is been called after the 7z was extracted. I tried in both ways. Nothing is working.

And if you use ExecWait?

Same thing :(

The situation is so odd that even when you run the EXE from its destination folder, after it was extracted/installed, it has no icon on the task bar.

If you run the same EXE from the origin folder, it has an icon in the task bar.

The only time you see an icon on the task bar is when you run the EXE after it was included in the installer itself.

Can you compare the file size/MD5 of the working and non-working .exe? If they match it might just be a icon cache issue on your machine...

Yes, MD5 is the same.

any idea how do I delete the icon cache?

Have you tried googling for 'delete icon cache'?

Thanks, it was the OS icon cache