4

I've known how to set the icon for the desktop and start menu shortcuts to use the Primary Output icon for a while now (by following this: Setting correct icon for Shortcut in VS2010 Setup Project), but I have a WinForms project that this frustratingly does not work for.

In my Setup Project, when I select the Primary Output as the icon for my desktop and start menu shortcuts, the correct icon does appear in the icon selection window with a random number below it, but when I build the project, then install from the MSI, the desktop and start menu shortcuts are still the default Windows application icon. If I open the Windows shortcut properties window and click Change Icon, it gives me an error "The file %SystemRoot%\Installer{ProductCode}{RandomNumber}.exe contains no icons...". I looked in the location specified and the 3 EXE's in that directory all have no icon.

I also checked a previous project where the shortcuts do have icons, and opened the ProductCode directory for that project and those EXE's do have icons. I checked all the settings between the two projects and they are exactly the same, so I'm not sure what I'm doing wrong.

Anyone experience this before?

Community
  • 1
  • 1
SRTie4k
  • 105
  • 1
  • 2
  • 8
  • Are you building it from your PC or are you using a build-server/other machine? – tgolisch Aug 11 '14 at 17:15
  • I found the best way around this issue, is instead of relying on the app.exe to have the embedded icon for the shortcut to actually include a .ico as Content in your project, then select this .ico file as the shortcut icon in your setup projects. Works for me. – Jon Aug 11 '14 at 18:49
  • @tgolisch I am building it from my PC. – SRTie4k Aug 11 '14 at 19:57

0 Answers0