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

Auswahl von Features


2 replies to this topic

Sir Charles

Sir Charles
  • Full Members
  • 40 posts

Posted 29 October 2007 - 14:13

Folgende Feature Konstellation ist gegeben:

MainFeature_1
SubFeature_1.1
SubFeature_1.2

MainFeature_2
SubFeature_2.1

Die Haupt- und Subfeatures sind standardmässig im SetupType-Dialog angewählt. Die Features können auch abgewählt werden. Die einzige Bedingung ist jedoch, dass mindestens eines der drei Subfeatures angewählt sein muss. Werden alle drei abgewählt, dann sollte der Weiter-Button ausgegraut sein. Hat jemand eine Idee?

Sir Charles

Sir Charles
  • Full Members
  • 40 posts

Posted 30 October 2007 - 10:11

Letztlich nicht so schwer wenn man die Funktion ermittelt hat:
Implementierung als CA mittels IS-Script und ohne Behandlung des Uninstall:

MsiGetFeatureState(ISMSI_HANDLE, "SubFeature_1.1", nvInstallState, nvSub11);
MsiGetFeatureState(ISMSI_HANDLE, "SubFeature_1.2", nvInstallState, nvSub12);
MsiGetFeatureState(ISMSI_HANDLE, "SubFeature_2.1", nvInstallState, nvSub21);

if (nvSub11=3 || nvSub12=3 || nvSub21=3) then
MsiSetProperty(ISMSI_HANDLE, "MyFeatureProp", "0");
else
MsiSetProperty(ISMSI_HANDLE, "MyFeatureProp", "1");
MessageBox("Select at least one Feature", INFORMATION);
endif;

Einhängen als DoAction vor NewDialog-Event im CustomSetup und gut isses.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 31 October 2007 - 10:00

Du kannst die Feature States auch ohne Script abfragen, siehe Conditional Statement Syntax in der Doku.