I got the icons right for my application, in the Start Menu, application folders, etc., but it doesn't come right into the Add or Remove Programs listing. What should I include for this?
Asked
Active
Viewed 1,988 times
7
-
Possible duplicate of *[Custom icon for ClickOnce application in 'Add or Remove Programs'](http://stackoverflow.com/questions/10927109/custom-icon-for-clickonce-application-in-add-or-remove-programs)*. – Peter Mortensen Nov 25 '13 at 19:30
2 Answers
5
You might not be able to do it directly through ClickOnce, as it's not supported. Maybe you could try editing the registry a bit as shown in Missing Icon in Add/Remove Programs for ClickOnce Application:
RegistryKey myUninstallKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Uninstall");
string[] mySubKeyNames = myUninstallKey.GetSubKeyNames();
for (int i = 0; i < mySubKeyNames.Length; i++)
{
RegistryKey myKey = myUninstallKey.OpenSubKey(mySubKeyNames , true);
object myValue = myKey.GetValue("DisplayName");
if (myValue != null && (string)myValue == _ApplicationName)
{
myKey.SetValue("DisplayIcon", _ExecutablePath + @"\App.ico");
break;
}
}

Peter Mortensen
- 30,738
- 21
- 105
- 131

Sandeep
- 5,581
- 10
- 42
- 62
0
You can add an icon using the Windows standard property ARPPRODUCTICON
.
In your standard Windows installer, add the following code. This will add an icon in the control panel.
<Icon Id="icon.ico" SourceFile="MySourceFiles\icon.ico"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico" />

Peter Mortensen
- 30,738
- 21
- 105
- 131

DigviJay Patil
- 986
- 14
- 31
-
1Humor me for a moment: where exactly does this code go? Where is the standard windows installer? – Automate This Apr 13 '17 at 20:29