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

Run-Time Select\Deselect features.


4 replies to this topic

ezrali

ezrali
  • Members
  • 12 posts

Posted 14 February 2006 - 17:55

Hi,
I build a basic msi project using IS.
I read some configuration file and I want to make some features invidsible.
I also want to select\deselect feature after SetupType dialog, and I want to know which features were selected after CustomSetup.

I tried to use: FeatureIsItemSelected, FeatureSelectItems, FeatureGetData and FeatureSetData with FEATURE_FIELED_SELECTED and FEATURE_FIELD_VISIBLE.

I gow -132 errorCode (The specified Media can not be found). I use MEDIA as a media, and I don't have any script created features.
D
oes those functions supposed to work on basic msi? If not, how ca I select/deselect features?
Does someone know how to solve this problem?

10x

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 15 February 2006 - 13:49

You can use feature conditions, setting the install level of a feature to 0 to make it invisible. This requires that you read that configuration file before CostFinalize.
You can select/unselect features from the Next button of the SetupType dialog by calling the control events AddLocal resp. Remove.

ezrali

ezrali
  • Members
  • 12 posts

Posted 15 February 2006 - 15:27

Thanks,

I'll try to read some more about your answer.

bogdan.carjac

bogdan.carjac
  • Full Members
  • 24 posts

Posted 26 November 2007 - 15:47

Hi,

I've got a similar problem, personally I want to remove a feature from Custom Setup dialog, from script, depending on business logic.
I've tried using

FeatureSetData(MEDIA, "MyFeature",FEATURE_FIELD_VISIBLE, FALSE, "");

but this returns always -132, like in your case.
I've tried other functions as well, but no success sad.gif.

Maybe you have already solved this problem, could you please tell me how you did it, in case you figured out how?



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 November 2007 - 13:02

FeatureSetData only works for InstallScript and "InstallScript MSI" projects (i.e. if the UI is handled by the InstallScript engine) but not for Basic MSI projects (where Windows Installer handles the UI).