This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: icons not displaying Add/Remove Programs
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 12, 2008
10:17 PM
icons not displaying Add/Remove Programs
Hi,
I am using Installshield professional 2008 with windows vista as OS.I am using the following function to display icons in Add/Remove Programs. But it gives error cannot create it and gives the error message "Unable to create the Add/Remove icon"
Alternatively i also went through General Information -->Add or Remove Programs--> and gave the icon path it only worked when i gave location of the icon on my machine such as Display Icon value as SUPPORTDIR ^ "Sample.ico" and the icon index as 0.
I am using Installscript project...
But when i executed the setup it doesnt display in the Add Remove programs list.Kindly help....
prototype ChangeAddRemoveIcon();
function ChangeAddRemoveIcon()
STRING szIcon;
string szKey;
begin
szKey="Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + PRODUCT_GUID;
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szIcon = SUPPORTDIR ^ "\Sample.ico";
if (RegDBSetKeyValueEx(szKey, "DisplayIcon", REGDB_STRING, szIcon,-1) < 0) then
MessageBox("Unable to create the Add/Remove icon",0);
endif;
end;
I am using Installshield professional 2008 with windows vista as OS.I am using the following function to display icons in Add/Remove Programs. But it gives error cannot create it and gives the error message "Unable to create the Add/Remove icon"
Alternatively i also went through General Information -->Add or Remove Programs--> and gave the icon path it only worked when i gave location of the icon on my machine such as Display Icon value as SUPPORTDIR ^ "Sample.ico" and the icon index as 0.
I am using Installscript project...
But when i executed the setup it doesnt display in the Add Remove programs list.Kindly help....
prototype ChangeAddRemoveIcon();
function ChangeAddRemoveIcon()
STRING szIcon;
string szKey;
begin
szKey="Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + PRODUCT_GUID;
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szIcon = SUPPORTDIR ^ "\Sample.ico";
if (RegDBSetKeyValueEx(szKey, "DisplayIcon", REGDB_STRING, szIcon,-1) < 0) then
MessageBox("Unable to create the Add/Remove icon",0);
endif;
end;
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 13, 2008
01:02 PM
There are few things you may want to take a look on.
- In your code you are setting the icon file path to SUPPORTDIR. This location available ONLY during installation and will be removed when installation ends. The icon file won't be displayed, because will be removed. If you want to display custom icon you need to install it with application. Usually ppl use icon from main executable, because it will be installed on the system and will be available.
- In your code you use HKLM to set Default Root, but I think it depend on type of installation ( for all users or for me only ). You may want to use "HKEY_USER_SELECTABLE" to set the root. In this case the root will depend on ALLUSERS value and will be installed into correct root.
- Last thing what you may need to verify is for Vista your installation process should run elevated in order to write into HKLM.
Hope you'll check this points and it will be helpful.
- In your code you are setting the icon file path to SUPPORTDIR. This location available ONLY during installation and will be removed when installation ends. The icon file won't be displayed, because will be removed. If you want to display custom icon you need to install it with application. Usually ppl use icon from main executable, because it will be installed on the system and will be available.
- In your code you use HKLM to set Default Root, but I think it depend on type of installation ( for all users or for me only ). You may want to use "HKEY_USER_SELECTABLE" to set the root. In this case the root will depend on ALLUSERS value and will be installed into correct root.
- Last thing what you may need to verify is for Vista your installation process should run elevated in order to write into HKLM.
Hope you'll check this points and it will be helpful.
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)