The application icon does not appear on the Add or Remove Programs control panel

I have a .NET application deployed through ClickOnce . The application icon is displayed perfectly in the "Start" menu, taskbar, etc., but not in the "Add or Remove Programs" on the control panel. What do I need to do to fix this?

+4
source share
1 answer

This is not supported by ClickOnce (although I keep asking about it all the time).

I compiled the following code many years ago, but I never had time to try it. I would put a try / catch around it if that causes a problem. Let me know if this works out .; -)

 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; } } 
+5
source

Source: https://habr.com/ru/post/1313394/


All Articles