0

I have made an msi installer through The Microsoft Installer Projects addon/Nuget. I am trying to set the icon of the shortcut to the User Desktop/Program Menu through Visual Studio however it defaults to the Microsoft standard executable icon when the program is installed.

Right clicking the deployment project -> View -> File System -> User's Desktop or User's Program Menu > Create a new shortcut. Right clicking the shortcut -> Properties Window -> Change the Icon under "Icon".

I have tried to select the primary output from project file, as well as adding the .ico file to the Application folder under "File System on Target Machine", and selected that. In the image below I select the ico file from the File System on the target Machine

For reference picture

In my primary output project file in the forms code I have also added:

this.Icon = Project.Name.Properties.Resources.Logo;

I have done the same to the NotifyIcon.

I have also added the same icon in the Forms Design Menu (though probably not necessary).

The executable itself shows the icon on both the taskbar and tasktray. The taskbar icon takes on the default icon instead of the one I picked whenever I add a shortcut to the "User's Programs Menu".

Not the right icon

Somecode
  • 15
  • 1
  • 4
  • You are setting icon for a form. The shortcut to exe-file displays first application icon (unless set otherwise), its set using winforms project settings. See [this answer](https://stackoverflow.com/a/17489516/1997232). – Sinatr Apr 22 '21 at 10:33
  • Right clicking my project -> Properties -> Application -> Icon: I can see that I have already added the same icon as my forms icon, so the application icon is set to: Resources\Logo.ico. In my resources folder I have the Logo.ico file. I must add that if I right click the .exe file, and send it to desktop, the shortcut has the right icon. – Somecode Apr 22 '21 at 11:08

0 Answers0