PDA

View Full Version : Wrong Icon in Add/Remove Programs



alan93
09-05-2003, 11:38 AM
This seems to be a "never ending story" bug.

using 6.3

Small install, CD media , only a few statements in it.

The icon showing in the Control Panel - Add/Remove is the icon of another exe getting installed to a sub folder of the Target folder.

On one install it was the icon of ANOTHER exe, in the same sub folder.

I've tested this on 2 windows 2000 machines and it is consistantly wrong.

The thing is it used to work.

I did rename the project with a new GUID, and I have deleted and rebuilt the media a few times. This matter?


I have seen the Qxxxxxx install shield solution of writing a WHOLE other function JUST to get the right icon to show up here but why should I have to ?


What makes it do this?

Christw
10-02-2003, 07:55 AM
It's a simple function. And, this is needed because WIndows 2000 allows other icons in the add/remove programs list...

prototype ChangeAddRemoveIcon(STRING)

function ChangeAddRemoveIcon(szIcon)
string szKey;
begin
if (SYSINFO.WINNT.bWin2000) then
//Only add the icon if the operating system is Windows 2000
szKey="Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"+PRODUCT_GUID;
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
if (RegDBSetKeyValueEx(szKey, "DisplayIcon", REGDB_STRING, szIcon, -1) < 0) then
MessageBox("Unable to create the Add/Remove icon", 0);
endif;
endif;
end;