Search code examples
winapishortcut-file

Desktop shortcut icon overriding app icon


We have an application that is installed with a desktop shortcut icon that is different than the application icon. So, the result we are aiming at is:

  • a desktop shorcut with icon A, pointing to our application
  • once clicked, the application will launch with it's own icon B

However, the observed behaviour is that our application is launched with the shortcut icon A visible in the start menu bar, and the proper app icon B visible in the title bar. Is there an option to override this behaviour?

We are using InnoSetup for our installer, if that matters.


Solution

  • I found one solution - having the process restart itself will fix the problem. It's pretty clumsy, but it works. I'll mark this as an accepted answer unless somebody has a better suggestion.