Customizing Component List in Components Tree

Got a problem you cannot solve? Try here.
chintanpatel7
Posts: 21
Joined: Thu Feb 16, 2012 11:02 pm

Customizing Component List in Components Tree

Postby chintanpatel7 » Mon Jun 18, 2012 12:12 am

Hi InstallAware Team,

Suppose I have multiple Features defined in my project.
Some of them are compulsory features to install in any type of installation [Typical, Custom or Complete].
Now if user selects Installation type "Custom" then system shows all the features in components tree from where user can check/uncheck any features.

[Question]: Can we make such compulsory features Read-Only or Hidden in components tree?

Note: Currently I have two other solutions for this:
1. Do not define such features and install their files features independently.
2. Raise error if these types of features are not selected.
But as per our project requirement I need to define and show these features for information purpose.

What can I do for this? Please provide suggestion.

Regards,
Chintan

chintanpatel7
Posts: 21
Joined: Thu Feb 16, 2012 11:02 pm

Re: Customizing Component List in Components Tree

Postby chintanpatel7 » Mon Jun 18, 2012 12:26 am

Hi InstallAware Team,

May be I found solution for this: The "Set Component Choice" command.
It should be done by unchecking the checkbox of "Allow user to select/deselect component."
I will let you know the result after I try it.

Thanks and Sorry for the inconvenience.

Regards,
Chintan

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Customizing Component List in Components Tree

Postby bokkie » Mon Jun 18, 2012 1:05 am

Chintan,

Glad to read you may have found the solution to your problem. The feature selection works very well in IA but sometimes you need to tweak properties or add some MSIcode to give you fuller control to do what you want. If you have any problems, I have a basic project I use to test features and components. It's not entirely usable but it has enough in it for me to be used as a reference. I could look at it and see if I can replicate anything you might have a problem with.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Customizing Component List in Components Tree

Postby FrancescoT » Mon Jun 18, 2012 8:10 am

Dear Chintan,

The "Allow user to select or deselect Component:" user interface command does exactly this.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: Customizing Component List in Components Tree

Postby SITL » Tue Feb 07, 2017 5:04 am

bokkie wrote:Chintan,

Glad to read you may have found the solution to your problem. The feature selection works very well in IA but sometimes you need to tweak properties or add some MSIcode to give you fuller control to do what you want. If you have any problems, I have a basic project I use to test features and components. It's not entirely usable but it has enough in it for me to be used as a reference. I could look at it and see if I can replicate anything you might have a problem with.


Dear Peter,
I'm having problem in implementing Components selection and dynamically displaying appropriate messages with hard disc space requirements.
Can you share the basic project you have to test features and components ?.

Appreciate your help.
Regards
SITL

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Customizing Component List in Components Tree

Postby bokkie » Tue Feb 07, 2017 12:43 pm

SITL,

Before I do, let me make sure you're happy with what my test project does. Let me explain.

It doesn't install anything! What it does is demonstrate how you load a text file containing what features were previously selected. That is, if you have features called 1, 2 and 3 and deselect feature 2 it displays a message telling you that features 1 and 3 will be installed. If you later modify the installed features it uses the text file to present the features in the same state you previously selected. That is, feature 2 would have the red cross against it. If you change the state of the features the text file will carry them forward to the next time you run the package with the maintenance option selected.

It contains the feature media blocks that you can modify to do whatever you want them to install. If you want to calculate the space used you'll have to change each feature block to calculate the disk space requirements for the files it installes, that sort of thing.

In other words the test project tests feature selections and deslections and displays messages for each one you've selected. What happens from there is entirely for you to do. That's why I say it really does nothing but as an aid to understanding features and how you can work with them it might be useful. It doesn't solve your problem but it might show you the direction you need to follow to get off to a good start. I have to say that because I don't want to raise your expectations too high. :D
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: Customizing Component List in Components Tree

Postby SITL » Wed Feb 08, 2017 12:46 am

Dear Peter,

Thanks for the details.

I can understand,I think this is what i wanted,
though i have not understood memory(space) part it.

In fact i have already completed most of the features.
You guys (especially Francisco) helped me a lot, Great !

This particular aspect i left because of other priorities.
I think, your test project would help.
If you can share it, that will save lot of time me explaining details.

Appreciate your help.
Regards
SITL

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Customizing Component List in Components Tree

Postby bokkie » Wed Feb 08, 2017 3:31 am

Let me clean it up a little and I'll post a 7z file later on. It's not a difficult sample project, just bear in mind that it's scope is limited to testing the preserved state of feature selections and it's not necessarily the best solution but it works all the same.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Customizing Component List in Components Tree

Postby bokkie » Wed Feb 08, 2017 3:53 am

SITL,

Zip file attached is the sample project. I've touched it using X5 so I hope it will open for you okay on your version of IA. I'm not using anything X5-specific but please don't quote me!

The project assumes there will be a folder called C:\Temp in which a features text file is written to and read from. I have that folder anyway but I've not tested the project if there isn't a C:\Temp so those are uncharted waters for you to test. For interest only note that I use a compiler variable to control the build time component called A3. The MSIcode isn't going to shake the fruit off any trees so I'll leave you to explore it. Any questions about what or why I do things in the project I will answer if you need more information. I'm sure you'll work it out.

By the way, I don't recall if I'm the original author of the project. I might have taken some code from somewhere and modified it for my needs. In case anyone jumps up and says it's theirs then that's where the credit should go. :)
Attachments
TestFeatures.zip
(739.11 KiB) Downloaded 433 times
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: Customizing Component List in Components Tree

Postby SITL » Thu Feb 09, 2017 2:15 am

Thanks, It will help me to understand.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 24 guests