LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Add icon in Add/Remove Program

Hi All,

 

I have created a installer of a program and I am trying to put a custom icon to my application in Add/remove program view under control panel.

 

I have checked the forum for the same, refer the link, the method described in the link works fine if I try to add the icon offline means after installation on the application. I have followed the following steps.

  1. From the installation folder open setup.ini file to get the product id of my application under the section "install.msi".
  2. Open the windows registry.
  3. go the key "KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\[YourProgram_Product ID]" .
  4. Add DispalyIcon key.

but I want to add the same feature while building the installer.

 

Can any one help me on the same.

 

Waiting for your positive reply.

 

Thanks

Pankaj

0 Kudos
Message 1 of 11
(2,083 Views)

Do you create your Executable with an Icon?  I've never actually built an Installer, but all of my Executables have custom Icons, and when I create a short-cut to the Desktop, the Icon comes along with it.

 

To add a Custom Icon to an Executable, proceed as follows:

  1. Create a suitable .ico file.  Put it in the Project in the Resources folder (create Folder if it doesn't exist).
  2. In the Icon category, uncheck "Use the default LabVIEW icon file".  Click the Browse button (which defaults to the Resources folder), select Icon.
  3. Do the Build.

I'm assuming a similar process will also work for an Installer.

 

Bob Schor

 

0 Kudos
Message 2 of 11
(2,056 Views)

When you create an installer, you should be able to create an entry in the Windows registry.

Have you tried that yet ?

 

 

0 Kudos
Message 3 of 11
(2,022 Views)

Confirm Bob.

You are specifying an icon for the application, not installer, no additional actions are needed.

 

The problem might be with different icon sizes. Windows uses the closest icon size from the icon file and rescales picture for its needs. I do not know if it allows and what the picture will look like if rescaling from 16x16 (details view) to 256x256 (thumbnails) or vice versa.

 

0 Kudos
Message 4 of 11
(2,003 Views)

Yes, I was talking about creating an Icon for the Application.  I've never done an "Installer" -- I was (naively) assuming that an "Installation" was similar to "Create an Application, and package it up, along with the necessary Run Time and other modules, arranging it to be installed in appropriate folders on the Target Machine".  If so, the first step, "Create an Application", I assumed would use the same "Icon" logic as the Application.

 

Bob Schor

0 Kudos
Message 5 of 11
(1,994 Views)

Hi All,

Thanks for suggestion.
I have created a custom icon for my application and i have included the same while building the executable, and after that I created the installer. I can get the same customized icon for the installed application.

but the problem comes when you go to add/remove program under control panel. the applicaiton is listed in the view but the customized icon will not be visible at all.

For you reference I am attaching the for my application and the Add/remove program view.

 

 

Installed program view.jpgAdd Remove Program View.jpg

 

Waiting for your reply.

 

thanks in advance.

 

Thanks

Pankaj

0 Kudos
Message 6 of 11
(1,967 Views)

You have received numerous replies (which confirms my findings when doing a Web Search on this question) suggesting the need for editing the Registry, which is perhaps not to be undertaken lightly!  Is this so important that you'd (potentially) risk compromising the Windows OS?  Notice in your example that numerous "commercial" applications that presumably use the Windows Installer which include "hooks" for such icons show the "default" icon, including software from Adobe and Microsoft (!).

 

Please choose a Solution from the ones already presented to you, or write a final post saying "I've decided this is too dangerous, so I'll live with the Generic Icon" and mark Yourself as the solver.

 

Bob Schor

0 Kudos
Message 7 of 11
(1,935 Views)

In the Installer Properties is a Registry section that can be used to add extra registry entries during installation. It should be definitely possible to add a new key in that way. It may even be possible to use variables rather than explicit strings for things like the ApplicationID and similar but that I'm really not sure about. Adding an explicit entry with the corrct AppID entry definitely is possible.

 

If substitution of variables is possible, you would likely have to use for instance [ProductCode] (including the brackets) as a reference to the product ID. Other possible variable names would be documented here.

 

Installer Properties.jpg

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
0 Kudos
Message 8 of 11
(1,926 Views)

You should put in a feature request to NI. When an installer is created it should automatically use the icon of the executable for the add remove programs entry. There should be no need to edit the registry manually or in the installer.

Glad to answer questions. Thanks for any KUDOS or marked solutions ;-)
0 Kudos
Message 9 of 11
(1,909 Views)
Highlighted

@PatrickLye wrote:

You should put in a feature request to NI. When an installer is created it should automatically use the icon of the executable for the add remove programs entry. There should be no need to edit the registry manually or in the installer.


But you can include multiple executables in an installer! You'd need to be able to select which one to use.

 

(Or no executable at all - I sometimes create 'prerequisites' installers to install the RTE/drivers that don't even include an executable)



Certified LabVIEW Architect (CLA), Certified LabVIEW Embedded Systems Developer (CLED) and Certified TestStand Developer (CTD)
MediaMongrels Ltd. - NI Alliance Partner | GDevCon :: 21-22nd August 2019 :: Birmingham, UK
0 Kudos
Message 10 of 11
(1,902 Views)