View Full Version : Bug in FeatureSelectItem ?

04-12-2002, 10:22 AM
In my project I have some components that I want to install on target system only on certain conditions. I have

used the function FeatureSelectItem, but I discover that it work ONLY on FIRST time call ! I have tried this code

to see this situation:

// Show features before change selection:
// Here all features are selected
SdFeatureTree('Test', 'Before False', INSTALLDIR, '', 2);

// Now I deselect 3 sub-features
FeatureSelectItem(MEDIA, 'DataBase\\DB_DB2', FALSE);
FeatureSelectItem(MEDIA, 'DataBase\\DB_MS7', FALSE);
FeatureSelectItem(MEDIA, 'DataBase\\DB_CFG', FALSE);

// Here I see only DB_DB2 feature is not selected;
// but DB_MS7 and DB_CFG feature still selected !!!
SdFeatureTree('Test', 'After False', INSTALLDIR, '', 2);

I have also tried to exchange the sequence of deselect (first DB_MS7, then DB_CFG, then DB_DB2) to check if there's

a problem with name of feature, but it deselect only first call (DB_MS7, in this case) of function

There are not any features marked as "Required Features".
I use InstallShield Developer version 7.02.

What's wrong ? Is a bug ?
Help !!!

04-12-2002, 02:26 PM
I would recommend debugging into this code to determine which InstallScript function is failing, and with what return code. This should help us narrow this down.

04-15-2002, 02:41 AM
The error returned by FeatureSelectItem was -105 (Specified feature cannot be found in the media). I have rebuild all and now work fine. Excuse me.