Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

FeatureIsItemSelected not working..


1 reply to this topic

Jayag

Jayag
  • Members
  • 7 posts

Posted 26 March 2006 - 17:51

Hi All,

I need to change the [INSTALLDIR] based on the feature selected from the AskOptions dialog box. But FeatureIsItemSelected method is NOT working for me. Even though i select a particular feature from the AskOptions dialog, it always returns an error -105 (which is Specified feature cannot be found in the media). The below code snippet is how i tried to use the FeatureIsItemSelected method. Can you please tell me what mistake i am doing.

nResult = SdAskOptions ("Product Selection", "Select the product to install.",
"", "", "DefaultFeature",
EXCLUSIVE);

if (nResult = BACK) goto Dlg_SdCustomerInformation;

szInstallDirPath = "";
szInstallDirPath = INSTALLDIR;

nRes = FeatureIsItemSelected(MEDIA, "Prod1");

if nRes = 1 then
szInstallDirPath = szInstallDirPath^"Prod1";
else
szInstallDirPath = szInstallDirPath^"Prod2";
endif;

FeatureSetTarget(MEDIA, "<INSTALLDIR>", szInstallDirPath);

I also tried to use "FeatureGetData", but it also returns false everytime. Any help would be greatly appritiated.

thanks & regards,
Jayag

Edited by Jayag, 27 March 2006 - 00:59.


Jayag

Jayag
  • Members
  • 7 posts

Posted 27 March 2006 - 01:20

Hi All,

I found the problem with my code. Actually i had the Prod1 under DefayltFeature. So i had to use

nRes = FeatureIsItemSelected(MEDIA, "DefaultFeature\\Prod1");

instead of

nRes = FeatureIsItemSelected(MEDIA, "Prod1");

thanks & regards,
Jayashree