Bug in Updating the the Add/Remove Icon in Control Panel - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

enigma
Posts: 89
Joined: Fri Jun 08, 2007 10:12 am

Bug in Updating the the Add/Remove Icon in Control Panel

I believe I found a bug in when assigning the Add/Remove icon. Here are the steps to reproduce the problem:
  1. Download the zip file, extract it, there is a file name "SaveAsTemplate.aip", open it in AI
  2. Click on Product Details panel, at the "Add/Remove (Control Panel)" section, change the icon file to point to the directory "\pics\App.ico"
  3. Then open the "SaveAsTemplate.aip" in notepad, navigate to "COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent"" section, there is a row with the name "controlPanelIcon.exe" and the source path "pics\App.ico". Presumably this is the icon path that we set just now. But below this there is another row with the name "controlPanelIcon_1.exe" and the source path "C:\Release Output\Esteem7 2006\ULOCK\App.ico". This "controlPanelIcon_1.exe" is used later in setting the shortcut icon under the section "caphyon.advinst.msicomp.MsiShortsComponent". This is a bug. :evil:
  4. If I build the "SaveAsTemplate.aip" now I will encounter a build error because the program can't find the component "controlPanelIcon_1.exe" in setting the shortscomponent.
  5. Expected result: once I change the icon in "Add/Remove (Control Panel)", the section in "caphyon.advinst.msicomp.MsiShortsComponent" that refers to it should be updated as well. I shouldn't get a build error no matter what.
Thanks for your help :)
Attachments
advanced installer.zip
(5.25 KiB) Downloaded 323 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Bug in Updating the the Add/Remove Icon in Control Panel

Hi,

I'm not sure how the "controlPanelIcon_1.exe" entry was created in your project. Can you reproduce this behavior with a new project? Please note that this entry is present in your AIP before adding the Control Panel icon (it is not added when you set the icon). I tested the scenario you explained with a new project and I cannot reproduce the behavior you encountered.

In order to fix your project you can remove this entry from your project:

Code: Select all

<ROW Name="controlPanelIcon_1.exe" SourcePath="C:\Release Output\Esteem7 2006\ULOCK\App.ico" Index="0"/>
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
enigma
Posts: 89
Joined: Fri Jun 08, 2007 10:12 am

Re: Bug in Updating the the Add/Remove Icon in Control Panel

cosmin wrote:Hi,

I'm not sure how the "controlPanelIcon_1.exe" entry was created in your project. Can you reproduce this behavior with a new project? Please note that this entry is present in your AIP before adding the Control Panel icon (it is not added when you set the icon). I tested the scenario you explained with a new project and I cannot reproduce the behavior you encountered.

In order to fix your project you can remove this entry from your project:

Code: Select all

<ROW Name="controlPanelIcon_1.exe" SourcePath="C:\Release Output\Esteem7 2006\ULOCK\App.ico" Index="0"/>
Regards,
Cosmin
I think the "controlPanelIcon_1.exe" was initially there in my project for a good reason; if you look at my initial ai project, you will find that AppProduction.exe refers to controlPanelIcon_1.exe initially. Which means that controlPanelIcon_1.exe is consumed in the initial project.

When I set the Add/Remove Icon in control panel, by right controlPanelIcon_1.exe's value should be updated, but now the AI program creates another similar key controlPanelIcon.exe and it doesn't remove the controlPanelIcon_1.exe. This is the problem, I think
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Bug in Updating the the Add/Remove Icon in Control Panel

Hi,

I managed to reproduce the behavior you encountered. When setting the icon for the Control Panel, Advanced Installer will name it "controlPanelIcon.exe" in the AIP file. If you set the same icon for a shortcut it will be named "controlPanelIcon_1.exe" (it uses the same icon file).

However, if you change the icon for the Control Panel, only the "controlPanelIcon.exe" entry will be modified. This is because the shortcut is not related to the Control Panel settings, it just uses the same icon. If you want to change the icon of the shortcut you need to do it manually through the Edit Shortcut Properties dialog.

Please note that if multiple resources in your project use the same icon, it doesn't mean that when you change one of them the other will also be changed. The fact that they use the same icon does not mean that they are synchronized.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”