Dialogs and CustomSetup
Posted 20 September 2001 - 05:23
Posted 21 September 2001 - 20:05
MsiGetFeatureState(hInstall, "LDAP", nvState, nvAction);
if nvAction > 2 || (nvState > 2 && nvAction = 2) then
// Setting global flag for later use. Could also put code here...
bLDAPInstall = TRUE;
Posted 27 November 2001 - 19:17
&Feature > 2
I also use this to condition the Back button of the dialog which follows, so that the user can't "back" into a dialog box which makes no sense.
However, I've seen it stated on this forum (I think) that one needs to re-call CostFinalize after CustomSetup in order to assure the correct setting of the Install states of the sellected feature(s). I've not done that, and have not yet encountered problems.
Stefan, good fellow, perhaps you can shed lome light on this issue.
Posted 27 November 2001 - 23:36
If you want to change the feature selection after CostFinalize you can use control events like AddLocal and Remove, or call SetInstallLevel
Posted 27 November 2001 - 23:53
1. The CostFinalize stuff is done, and the feature states are evaluated and set.
2. The SetupType and (possibly) the CustomSetup dialogs are run. I'm most concerned about CustomSetup, because as a consequence of that dialog, the selection of features will almost certainly change.
3. Some sort of machinations are needed to bring the Install states up to date with the choices made in the CustomSetup dialog.
Doesn't that sound strange? The purpose of CustomSetup is to change the complement of selected features. Are you saying that the install state properties of the features are not updated automagically to reflect the selection in CustomSetup? What good are they then, if they cannot be "trusted" in any situation other than a "Complete" installation?
I must conclude that I don't understand their purpose, or your comments, or both.
Posted 28 November 2001 - 11:19
Feature conditions are evaluated during CostFinalize. This makes a default selection of features, or can even hide a feature that doesn't apply to the operating system or something.
Later the CustomSetup dialog can change the feature selection. CostFinalize is not required to make these selections take effect. The dialog directly changes the features' selection state.
The install states of the features are automatically updated by the CustomSetup dialog and can be used without re-running CostFinalize.
Posted 28 November 2001 - 16:16