PDA

View Full Version : Setup Type "Complete" depending on VersionNT



tfojvdl
12-03-2008, 06:55 AM
Hello,
I created a small setup (msi project) including two Features

FeatureXP with Install Level 200
a condition sets Install Level to 100, if VersionNT<600

FeatureVista with Install Level 200
a condition sets Install Level to 100, if VersionNT>=600

When I now run the installation with Setup Type "Custom" I can see the respective feature disabled and the installation is installing the XP files on XP and the Vista files on Vista.

My problem is, that Setup type "Complete" installs both features. Even when I remove the conditions and just leave the Install Levels 200, the features get installed. It seems that "Complete" really means all features.

But I would like to install certain features depending on operating System version, even when not using "Custom" Installation.

How can I do that?
Has it something to do with Event AddLocal=ALL?

Thank you
Jürgen

mberterm
12-05-2008, 10:10 PM
Has it something to do with Event AddLocal=ALL?
Yes, setting the AddLocal property to 'all' overrides the install level.

tfojvdl
12-08-2008, 03:49 AM
Thanks for your reply.
What can I do, to configure my "complete" Setup in a way, that it installs a feature depending on the operating system?

Any idea?

mberterm
12-08-2008, 12:11 PM
If there are any Features to be omitted in a 'complete' installation, if only for being platform specific, do not set AddLocal to 'ALL'. Adding a feature to the AddLocal list will override any condition it may already have.

MSI offers this competing functionality of (a) the feature conditions and (b) the AddLocal property. As a design decision, choose which one will work best for you. An advantage of using the property is its ability to be set on-the-fly, i.e. with a custom action which evaluates the appropriate features.

Since you appear to already have conditions set on the features, you could just not set the AddLocal property.

Or you might consider setting it to the sub-set of Features which are necessary for the platform to which the package is being installed.
AddLocal=MyFeature1,WinXPSP3Files,GeneralAppFiles,AllDataFiles

And remember, Microsoft warns (http://msdn.microsoft.com/en-us/library/aa367536.aspx): Do not enter ADDLOCAL=ALL into the Property Table, because this generates a locally installed package that cannot be correctly removed.