cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
elangochd
Level 3

Individual Feature Conditions

I am a very novice/newbie in InstallShield Development. Here is my Basic MSI Question and I'd appreciate if anyone can help me out here.

I've two features (WebApps & Utilities) each of which has two sub features. All these are written in .NET and I've set the Product level conditions in the "Project Assistant - Installation Requirements" as "No Specific operating System is required" and only ".NET 2.0" and ".NET 3.5" as required.

I've also added the .NET 2.0 and 3.5 as Re-distributable as well. Now the "WebApps" feature can be installed only on a 2003 or 2008 server and it needs to have IIS installed on it. And the "Utilities" feature can be installed on any OS with .NET framework 2.0 & 3.5 (it should install if it's not present).

Now, I've given this condition for the "WebApps" and its sub features: ISIISMETABASECOMPATPRESENT=1 AND (VersionNT=502 OR (VersionNT = 600 AND WindowsBuild=6001)).

The InstallLevel is 1 for all features and subfeatures.

The Product conditions defined in the Project Assistant are evaluated fine. But not the Feature conditions. What should I do? Also am I doing right by checking for .NET frameworks at the product level?

Thanks for your help in advance.
Labels (1)
0 Kudos
6 Replies
Lurean
Level 8

I had a similiar requirement to implement a while back, with slightly different needs. I needed to still show the web feature even if it is not allowed to be installed. What I did was check the IIS_VERSION to see if it was defined. It is not defined if IIS is not installed. I did this check from a dialog next button on the customsetup dialog and paired it with a check to see if the feature was selected.

To disallow the install of the web feature as you are doing it you would need to set the installLevel=0 if the conditions are not met for installing it. The feature would then not show in the list of features to be selected.
0 Kudos
elangochd
Level 3

Thanks Lurean.

I tried what you suggested:

1. Set the Install Level of my Web Feature to 0.
2. In the CustomSetup Dialog - Next (Behavior) I have the following condition:
Acton: Enable, Condtion: (&WebApps = 3) AND (VersionNT=501 OR (VersionNT = 600 AND WindowsBuild=6001))

Just to make sure it gets enabled just on WinXP (I didn't even check for IIS this time) and while running, it totally disabled the feature altogether. Am I doing anything wrong here?

Thanks,
Elango.
0 Kudos
elangochd
Level 3

As per another thread here, I provided this and still I am getting nowhere. I appreciate if anyone can guide me here. Here is my feature Hierarchy

Apps (main/optional feature) --> Should verify whether IIS is present and can be installed only on Win2k3 and Win2k8 Servers.
Browser (sub feature)
WebService (sub feature)
Tools (main/optional feature --> No conditions, can be installed on any OS
Tool1 (sub feature)
Tool2 (sub feature)


Here are the main properties of the "Apps" feature:
Install Level: 100
Condition:
Level: 1, CT_Apps = 1
Level:200, CT_Apps <> 1

The sub features inside the "Apps" main feature has this condition set:
Level: 1, ISIISMETABASECOMPATPRESENT=1 AND (VersionNT=502 OR (VersionNT = 600 AND WindowsBuild=6001))

In the "User Interface - Dialogs - Custom Setup - Behavior", I provided the following conditions for the "Next" button. (I just wanted to check whether it gives an error message as my OS is not supported and exits out as my dev PC is XP)

Event: [CT_Apps], Argument: 1, Condition: (&CT_Apps=3) AND (VersionNT=502)
Event: [CT_Apps], Argument: 0, Condition: NOT ((&CT_Apps=3) AND (VersionNT=502))

This displays the CT_Apps option as "not-selected" while doing custom installation, but on selecting the application to be installed it doesn't give the respective error message that my OS is not supported. I am kind of stuck here as whether providing this check in the "Custom Setup" would even work for checking this condition as if the user selects "Default" installation, it would not even check this condition.

If any one can provide me the correct sequence of conditions to check this, I'd really appreciate it.

Thanks,
Elango.
0 Kudos
Lurean
Level 8

if you set the install level to 0 it will not show up. using the condition on the "next" button is a way to let it show still and stop someone from selecting it if the conditions are not met. (use the NOT keyword on your condition or set the condition to check for the circumstances you do not want it to install under.)

Also you will need to decide what functionality you want if someone tries to violate the condition. We have it display a custom made dialog window telling them they cannot choose that feature.
0 Kudos
chrislynn5
Level 6

Can you please tell me how to set up a IIS website as a feature?
I have all my componetns and features well defined but when I use the Server Configuration>Internet Information Services option I don't see it in my conponents to set to a feature, etc?????
I'm using Basic MSI project, thanx!
0 Kudos
chrislynn5
Level 6

duh, I now see the Component setting on the website parameters.
0 Kudos