cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Superfreak3
Level 11

Reevaluate Feature Condition(s)?

Hi there,

I have a couple of features that are installed conditionally based on the presence of a third party app. The app is detected via a System Search of the Registry for a raw value which sets a property used in the condition. During initial installation, it works fin as expected both in the absence and presence of the third party app.

Here is where an issue comes in. If a target machine does not have the third party at time of installation of our product. Afterwards, the user installs the third party app and needs are 'stuff' contained in the said feature(s) to work in conjunction. I thought one could simply run a Repair or Modify, the registry would be searched, conditions reevaluated and the pieces would be put in place. That does not appear to be the case.

No matter what I try after initial installation, I can't get the now needed Feature components to install via a Maintenance install. The only thing that currently works is uninstall/reinstall. Is there any way to get this to work from a maintenance install? The features are displayed on the Modify dialog. I even tried marking the components to reevaluate conditions thinking that may use the feature conditions because there are no component conditions involved.

Any help in getting this to work from Repair/Modify, if possible, would, as always, be GREATLY APPRECIATED!

THANKS!!
Labels (1)
0 Kudos
(9) Replies
Superfreak3
Level 11

I received this reply elsewhere...

Use ADDLOCAL property to install additional features after initial install.

MsiExec /I {productcode} ADDLOCAL=feature1,feature2 /qb

http://msdn.microsoft.com/en-us/library/windows/desktop/aa367536(v=vs.85).aspx


If this is true, I'm not quite sure what the Modify option is on the maintenance dialog is for then. I would think that should handle the ADDLOCAL adjustment by setting the desired, displayed features to install.

In my install, the two features in question are the only two set as visible.

I can't quite comprehend that the command line is the only way to add these two features. If the modify option doesn't do it, I would need a custom action to get the list of currently installed features, add the ones now selected to be installed and go from there.

I must be missing something as I would think there has to be a way to get selecting the Modify option to do the trick.
0 Kudos
ElenaN
Level 6

One of my projects is similar to the one that you described. By default features which were not installed by fresh install are deselected, but they can be set to Install state on CustomSetup dialog and Modify mode actually works for me (installs new features).
If you want feature state to be changed without manual actions on CustomSetup dialog, you can use “AddLocal” event on (for example) Next button of MaintenanceType dialog when modify option is chosen and System Search has found third party app.
BTW, I’m talking about basic MSI project.
0 Kudos
Superfreak3
Level 11

ElenaN wrote:
One of my projects is similar to the one that you described. By default features which were not installed by fresh install are deselected, but they can be set to Install state on CustomSetup dialog and Modify mode actually works for me (installs new features).
If you want feature state to be changed without manual actions on CustomSetup dialog, you can use “AddLocal” event on (for example) Next button of MaintenanceType dialog when modify option is chosen and System Search has found third party app.
BTW, I’m talking about basic MSI project.


When you set AddLocal on the Next button, did you list in the value the features that were already installed + the new features you wished to add via maintenance. Or was it just AddLocal="FeatToBeAddedName". I guess you conditioned the set property action with the feature state... something like &FeatToBeAddedName=3. ??

Oh, and yes, basic MSI is what I'm using.

Thanks for that info so far.
0 Kudos
ElenaN
Level 6

There is no need to list already installed features in modify mode. You should get something like:

Event __________ Argument _______________ Condition
AddLocal ________ FeatureToBeAddedName1 __ CorrespondingPropertyFromSystemSearch1 And (_IsMaintenance = "Change")
AddLocal ________ FeatureToBeAddedName2 __ CorrespondingPropertyFromSystemSearch2 And (_IsMaintenance = "Change")
0 Kudos
Superfreak3
Level 11

Ah, NICE! Thank you. I will try that tomorrow!!!
0 Kudos
Superfreak3
Level 11

ElenaN wrote:
There is no need to list already installed features in modify mode. You should get something like:

Event __________ Argument _______________ Condition
AddLocal ________ FeatureToBeAddedName1 __ CorrespondingPropertyFromSystemSearch1 And (_IsMaintenance = "Change")
AddLocal ________ FeatureToBeAddedName2 __ CorrespondingPropertyFromSystemSearch2 And (_IsMaintenance = "Change")



This appears to have gotten me on the right track as I can now install the Feature during Maintenance = Change (Modify), but the system search condition seems to be ignored. The scenario is that a user has installed a third party app that will place registry entries that I use for my install trigger for the now needed Feature(s). My first test was to install my app in question without the registry entries in place. Here, the features were NOT installed, which is correct. Before adding the registry entries that would be placed by the third party app I decided to try the Maintenance install, which I thought would not place the features due to the lack of the reg key. After marking to install locallay from the Feature Selection dialog, the files are installed. I did not expect this. Does marking the feature in the dialog override the conditions?

Here is my condition...

THIRDPARTY14 AND VersionNT>=601 AND (_IsMaintenance = "Change")

Again in my quick test, the THIRDPARTY14 property should not be populated because the following reg value is not in place...

HKLM\SOFTWARE\ThirdParty\ThirdParty API Runtime\11\ThirdParty Manage... Path value.

It wouldn't be the end of the world if the files got installed, but it would be nice to prevent if the user inadvertently runs through the mnt install.

Any further info, help is APPRECIATED!!
0 Kudos
ElenaN
Level 6

Superfreak3 wrote:
After marking to install locallay from the Feature Selection dialog, the files are installed. I did not expect this.


You made manual command to install the feature, but expected the command to be ignored? Sounds weird.
Inadvertent run through the maintenance install is just clicking Next, Next, Next (IMHO). That scenario won’t install the feature.
0 Kudos
Superfreak3
Level 11

ElenaN wrote:
You made manual command to install the feature, but expected the command to be ignored? Sounds weird.
Inadvertent run through the maintenance install is just clicking Next, Next, Next (IMHO). That scenario won’t install the feature.


I just expected that since the Feature conditions were not met, even thought it was selected for install on the Feature selection tree during mnt, it would still not be installed. I thought manual selection in conjuction with conditions would determine its fate.

I see what you are saying though... mistakenly navigating through a mnt install would not install anything unless specifically selected to install in the Feature tree.

It seems that selection to install on the dialog overrides all else. I guess I can live with that.

I don't display the Feature Tree during initial install. I wonder if it acts the same there as well.
0 Kudos
Superfreak3
Level 11

Superfreak3 wrote:
I just expected that since the Feature conditions were not met, even thought it was selected for install on the Feature selection tree during mnt, it would still not be installed. I thought manual selection in conjuction with conditions would determine its fate.

I see what you are saying though... mistakenly navigating through a mnt install would not install anything unless specifically selected to install in the Feature tree.

It seems that selection to install on the dialog overrides all else. I guess I can live with that.

I don't display the Feature Tree during initial install. I wonder if it acts the same there as well.


I believe I'm OK and things are working in an acceptable fashion for us. I did find that if I add Component conditions, I can prevent the installation of various aspects even though the Feature is set to install on the Maintenance dialog. The dialog is indicating based on the Feature conditions if it/they will be installed or not, which is good.

We are just going to go with that. If the end users sees red X's indicating the Feature(s) will not be installed, they should realize that the third party app. has not been installed.
0 Kudos