Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Icon for ClickOnce application in 'Add or Remove Programs'

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?

like image 223
Globis Avatar asked Nov 07 '12 08:11

Globis


People also ask

Where is my ClickOnce application installed?

Every ClickOnce application installed on a local computer has a data directory, stored in the user's Documents and Settings folder. Any file included in a ClickOnce application and marked as a "data" file is copied to this directory when an application is installed.

How do I uninstall ClickOnce app?

To uninstall a ClickOnce application, users can go to the Control Panel and launch the "Add or Remove Programs" application. In the "Change or Remove Programs" section, users then select the application to uninstall and click the Change/Remove button.

How do you add prerequisites to a ClickOnce application?

ClickOnce allows you to add prerequisites in ClickOnce deployment. It should download the installer packages for those prerequisites to your development machine. When you publish the ClickOnce application, choose Download prerequisites from the same location as my application.

What is a ClickOnce application reference?

Application reference file used by ClickOnce, a Microsoft platform used to deploy and run remote Web applications; contains a local or remote link to an application; commonly used to enable links from the Windows Start Menu.


1 Answers

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;
    }
}
like image 171
Sandeep Avatar answered Oct 05 '22 09:10

Sandeep