cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
deepakzworld
Level 4

Ability to select which components to install

Hi,
I have all the components as part of the default feature which is always installed.
However, I want to install only those component that the user selects before the file transfer via a custom dialog with checkboxes that I am providing in my installer.
Based on the return value of these checkboxes, I want to either include or exclude the corresponding components from the default feauture installation.
As such, is there a a way to just exclude the component with the feature still getting installed?
I tried using both 'ComponentSelectItem' as well as 'FeatureselectItem' by passing the component name as one of the arguments since the help says that 'ComponentSelectItem' has been depprecated, but none of the functions calls worked for me.

Any help is greatly appreciated.

Thanks
Labels (1)
0 Kudos
(3) Replies
gridman
Level 8

Features are the smallest installable part of a product from the end-user's perspective. Components are the smallest installable part of a product from the installation developer's perspective. This is the key piece of information you need to understand to do what you want.

The end user has no access to the components in your installation. They only have access to the features. But since you only have one feature, which is a required feature that is always installed, there is nothing for the user to select or deselect.

As I see it, you only have one choice. You must isolate the components that are required in your installation, and put them under the required feature. Now, for the optional parts of your installation, the user can't access the optional components, because he does not know about them. He can only select or deselect features.

For each component that is optional, you must create a corresponding feature for it, then assign the component to the feature. Make each of these features optional. Then during the installation, the user will select or deselect each optional feature, which will in turn, select or deselect the component that belongs to the feature.

That should accomplish what you want.
0 Kudos
deepakzworld
Level 4

Thanks for the reply gridman.
I understand how features and components are structured and their visibility and accessibility.
But the user is not selecting the features or the components during the install. Rather, I have a custom dialog boxe that lists various services to be installed. Each of these services, internally, is associated with a component.
But all components are part of the sinlge default feature as I don't want to create a feature per service since there could be a number of them in the future. Atleast I don't want to create the features parallel to the default feature.

One approach that I am trying right now is to create sub-features under the default feature, make them invisible, and then associate each of these features with one compnent (that contains one service). So that based on the user input to the checkboxes, I can select or deselect these sub-features. Using 'FeatureSelectItem' for these sub-features but it's doesn't work...
I am sure there is a way out.
0 Kudos
gridman
Level 8

Okay, I understand. I'll think about it some more and see if I have any suggestions. 🙂
0 Kudos