/build/static/layout/Breadcrumb_cap_w.png

Feature Condition in MSI maintenance mode

Hi,

I have a scenario wherein i have say 5 features in MSI (say A,B,C,D,E).

First user installs say only two features (A,B) and finishes the installation, now after few days he want to install one more feature which was not installed before (say C) and remove one of the feature which was installed before (say B), so he will double click the MSI, out of modify, change, and remove he selects modify radio button, clicks next and on feature selection box he selects extra feature (C) he want to install and unselects the one he wants to uninstall (B).

Now i want to know the condition which i can use at runtime to find which was the feature he installed firsttime and he wants to retain that feature (i.e., featurename of the one he wants to repair) (in this case it's A)

To check whether feature is selected for installation or not then we use "&FeatureName=3" and To check whether feature is installed locally or not then we use "!FeatureName=3".

Similarly i want to know the condition for the repair scenario (i.e., feature is already installed and user is repairing that feature)

Thanks


2 Comments   [ + ] Show comments
  • One, why would you need to know and two, where are you using that syntax? - anonymous_9363 10 years ago
  • 1. I have the requirement wherein i want to display user what action is he performing on what feature, i.e., which feature he is installing freshly, which feature is he uninstalling and which one is he repairing
    2. I am using the syntax in Installscript (e.g. MsiEvaluateCondition(hMSI, "&FeatureName=3"), I am executing installscript on next button event

    Do share your idea on how to find which feature is user repairing at runtime

    Thanks,
    Ishant - ibahrani 10 years ago

Answers (1)

Posted by: xblackhand 7 years ago
White Belt
0
To reinstall upon repair I used:

(!FeatureName=3 AND REINSTALL="ALL)
//if feature installed         //repair mode selected

To modify the program through the modify dialog, I first selected the already installed features by checking the registry for a matching version number and display name.  Then I used FeatureSetData in the OnAppSearch() function to select or unselect depending on if the feature was already installed.

To Install if not installed in modify mode I used:

(!FeatureName=2 AND &FeatureName=3)
//feature not installed      //feature is selected

To uninstall if installed and deselected in maintenance mode I used:

 (&FeatureName=2 AND !FeatureName=3)
//feature not selected       //feature is installed
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ