How to change windows Application's default icon in Setup Project
Asked Answered
P

7

24

How to change the Windows Application's default icon with other one in C# desktop application. I am trying to change it in Setup Project but it is not. I want to show my own icon with Application's shortcut rather then windows default icon

Paduasoy answered 11/1, 2010 at 10:52 Comment(0)
F
47

It is truly odd that when you are creating a deployment (set up) project, and you create a shortcut to the "Primary output" (an .exe), the shortcut does not automatically get the .exe's icon. Instead it gets a generic document shortcut icon. Some of the answers here suggest adding an .ico file to the installer, but that certainly feels wrong. You can get the desired icon into the shortcut without adding an .ico file.

Assuming you have already given your program the desired icon,

  • In the solution explorer, right click on the installation project and go to "View -> File System".
  • in the File System window, find the shortuct whose icon you want to change (for example, under "Users's Programs Menu")
  • go to the shortcut Properties (right-click and pick "Properties Window")
  • go to Icon
  • Browse...
  • change "Files of type" to *.exe
  • browse to and select your "primary output"
  • OK, OK

And as serhio pointed out, a similar process can set the icon for the Control Panel's "Add or Remove Programs" list.

Filiano answered 29/9, 2010 at 22:25 Comment(7)
It works for shortcuts but if you want to add an icon to your project's primary output you should do like neo wrote in the answer belowBarbrabarbuda
"go to the shortcut Properties"--can you give more information? E.g., "Click on ___, then click properties". Not sure where to look for this.Intervene
@notfed: I added 3 more steps. Hope that helps.Filiano
Also, make sure your exe's project properties (the one the setup project is installing) has the "Icon and manifest" checked with the icon referencing your icon resource.Firedrake
"change "Files of type" to *.exe" , after click OK, It goes to the icon window, the ok button is greyed out, any ideas? ThanksZante
@Firedrake 's answer solved my problem. But the icon still not changeZante
@Zante I encountered the same thing at first, but discovered that Elmer is correct; 256 seems to be too big. Using a 128 icon made the icon appear when choosing .exe as the icon source, and thus enabling the OK button.Insensibility
A
12

You can also change the Icon in the Add & Remove Programs list.

For this select the Setup1 project and select the property AddRemoveProgramsIcon.

You can select an .ico file or leave the main .exe output as file for the icon.

Angilaangina answered 19/5, 2010 at 21:37 Comment(0)
P
12

Make sure you .ico is not to big. Had this issue for hours just to find 256x256 is to big. 48x48 is perfect but I think 128x128 might also work.

Prefab answered 2/8, 2017 at 11:47 Comment(2)
What the hell this worked for me also after hours of experiencing this issue. And yes 128x128 also works!Fussy
wowie same, I was getting a blank document icon and wasn't working. Resized to 128x128 and it workedHatchett
R
9

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.

Thnks

Revegetate answered 11/1, 2010 at 11:0 Comment(0)
W
2

You can change the icon of the application inside the Windows Application itself. And put that application in the setup project.

Right click the WinApp Project and inside the Application section you can choose and Icon which will be an ico file. Browse for the icon file and select it. Build the project and attach it to the setup project.

Wilbertwilborn answered 11/1, 2010 at 10:56 Comment(0)
C
0

Right click on Primary Output of Your Project and Select Create Shortcut. Give it a name and then click on its properties and set the icon.

In the setup project you cannot change the primary output's icons. You can create new shortcuts on the desktop etc and apply custom icons on those.

Carolanncarole answered 11/1, 2010 at 11:3 Comment(0)
G
0

I add the same issue. I tried all the above answers but I were not to add my icoenter image description here

This was happening because the the name of the ico was to long et the pixel size was to big. After renaming my ico to as smaller name like gs.ico and resize it to 48X48 pixel, it worked

Giaimo answered 28/9, 2020 at 2:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.