Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Installer Project: Installer and Application Icons

I've got an icon for one of my applications, which I've embedded in a resource file and is used as the main icon for the application. So far so good.

However, I want to use the same icon for the installer project, and for the shortcut that the installer places in the Start Menu. I can set the icon for the installer package itself, but only if I add the icon as an .ico file in the main application folder.

The whole point of embedded the icon in a resource file is so that I don't have an ICO file floating around in Program Files. I can't access the resource file from the main project in the installer project - is there some trick that I am missing?

Secondly, even if I include an icon in the main folder, if I set the menu short cut to use it, it doesn't - it shows the standard shortcut icon both in the IDE and in the menu after the program has been installed. Again, am I missing a trick here?

like image 216
CJM Avatar asked Jul 15 '10 14:07

CJM


People also ask

How do I add an icon to setup project in Visual Studio?

Right click on you windows application project, select properties. In the properties window, select the application tab. In the application tab, there is a radio button saying Icon and manifest. Select that and browse and select your custom icon for the application in the Icon drop down menu.

How do I change installer icon?

Change the icon Create an installer project with the right settings that you want and build it. Right click with your mouse on the icon folder and choose “Add Resource…” Save the setup.exe and return in Windows Explorer to the release folder. You should now see the new icon.


1 Answers

I have no time to test it now, but when you browse for an icon you will be presented with a dialog that lets you choose items that will be on the target computer. At the bottom of the dialog is a dropdown that lets you select the file type. If you choose EXE (or possibly DLL), then you primary project output(s) will show. Once you select that you can chose any embedded icon that your project output contains.

(What I did not test: If the icons actually show after you installed your software on a test computer.)

like image 100
Stefan Egli Avatar answered Oct 14 '22 12:10

Stefan Egli