prasoon
Posts: 7
Joined: Thu Feb 21, 2013 6:29 pm

Quick selection tree

Hi

I have one "quick selection tree" in my dialog that is basically populated with the help of "Organisation"

Currently 4 checkbox's are coming in my "quick selection tree" as i have 4 folders in "Orgnisation". In one of my dialog i have one TextBox that should be visible only if 2nd checkbox is selected. So how can i track wheher my 2nd checkbox is selected or not?

Thanks:)
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Quick selection tree

Hi,

In order to achieve what you want you can follow the steps below:
- select the text box you want to be visible only if the second checkbox is selected
- in the "Properties" pane set "Visible" to "False"
- go in the "Control Condition" tab and use the [New] button to create a new control condition
- in the newly appeared dialog set "Action" to "Show"
- click on the [...] button to set a condition
- in the newly appeared dialog double-click on the "Feature will be installed locally. The feature is not reinstalled" predefined condition
- a new dialog will appear and will show you all the features you have in the Organization page
- select your second feature
- click [OK] for all open dialogs
- build and run the project

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prasoon
Posts: 7
Joined: Thu Feb 21, 2013 6:29 pm

Re: Quick selection tree

Thanks alot that solution work perfectly :)
sunilkumawat
Posts: 6
Joined: Wed Jul 25, 2018 10:09 am

Re: Quick selection tree

Hi Eusebiu,
I have encountered the same issue.In Organization window I have 4 features. After successful installation of the tool, I run the installer again and modify features and selected which was left unselected at the time of fresh installation. Now I am not getting the Selected feature value. And I did the same as you explained aforementioned reply. But still I am not able to Visible a textbox(For an example). Please help

Note: I am using Quick Selection tree in maintenance.

Thanks In advance.
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Quick selection tree

Hello and welcome to our forums,

Let's say we have three features we want to install, those being MainFeature, Feature and Feature1. Upon installing, you will chose only MainFeature and Feature to install, letting Feature1 unselected. If you want to, let's say, display a textbox if your Feature1 was selected for install during Maintenance mode, you can follow this step-by-step way:
1) We firstly have to add the textbox on our dialog. To do this, you can go to Dialogs page and under "Maintenance" add a textbox on "VerifyReadyDlg" by pressing the "Control Toolbox" and selecting "Static Text". We have chosen to place the static text on "VerifyReadyDlg" because it is the first dialog that follows after "CustomizeDlg" (the one where we select which feature should be installed). After adding the static text, click on it and on the right pane ("Properties" tab), set the "Visible" attribute to "False".

2) After that, we have to create a control event which will display our text if a condition is met. In our case, the condition will be installation of the selected feature. To do this, you can go to "Control Conditions" tab, press on the "New..." button. Now press on the "..." button which is placed next to "Condition" field. Now press on the "Control Events" button which is placed next to "Expression" field. Upon doing that, you will be prompted with a "New Condition Wizard" dialog.

3) In the "New Condition Wizard" dialog, press "Next" --> select the "Feature" radio button --> click "Next" --> select the feature for which you want the condition to apply (In our earlier given example, the feature is "Feature1") --> in the "Will perform action" field, select the "Feature will be installed local. The feature is not reinstalled" --> click "Next" --> click "Next" --> click "Finish". After setting the condition, we now have to set the "Action" field to "Show", so our text will be shown if we chose the "Feature1" to be installed.

4) Now the last step is to run your setup in Maintenance mode --> chose Modify --> in the quick selection tree, select the feature and press the dropdown button (the green arrow pointing down) --> select "Will be installed on local hard drive". This way, upon pressing "Next" you will see that the static text is shown on the next dialog. The message was not shown in your scenario because, most probably, you had the "Entire feature will be unavailable" option ticked (the red "X" icon placed on the left side of the Feature). Even if you want to install the feature, if you have that option ticked, the component of that feature will not be installed.

Hope this helps!

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sunilkumawat
Posts: 6
Joined: Wed Jul 25, 2018 10:09 am

Re: Quick selection tree

Thanks a lot for your quick response and solution.

PFA

But now as I have 4(Lets A,B,C and D) features if I select only 2(Lets A and B) at the time of fresh installation, it install only two while modify I select only 1(Lets C) more feature then it installed 4th one too. however I have not selected 4th one i.e. D.

Please refer attached log file:

I used LogFeatureProperties for log write. In MsiSelectionTreeSelectedFeature property also is shows only one feature but at the time of calling InstallOrUpdateDatabases function it install Adaptace Database too. Please help.
Attachments
package.log
(715.54 KiB) Downloaded 272 times
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Quick selection tree

Hello,

I was not able to reproduce the behavior you have described. Can you please make sure that the feature you want to not be installed (feature D) has the "Entire feature will be unavailable" option set from the "CustomizeDlg" (the dialog which contains the selection tree) in maintenance mode ?

If that still does not help, can you please send us the .aip (project file) and a log for install process of your setup by e-mail at support at advancedinstaller dot com so we can investigate its settings?

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sunilkumawat
Posts: 6
Joined: Wed Jul 25, 2018 10:09 am

Re: Quick selection tree

Okay, I mailed on the mail Id.
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Quick selection tree

Hello,

After having a look at your project, I have noticed that in Dialogs page, under Maintenance --> CustomizeDlg --> DatabaseDialog, you have an "Init Event" with the following: "Install one or more features locally", with the argument being "Adaptace Database Integration Tool" and the condition being "AI_MAINT". This "Init Event" causes your feature to always be installed, even if you do not choose it from the quick selection tree (Maintenance mode).

Hope this helps!

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sunilkumawat
Posts: 6
Joined: Wed Jul 25, 2018 10:09 am

Re: Quick selection tree

Thanks a ton.. It made my day :)
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Quick selection tree

Hello,

You're always welcome!

I am glad you got this working!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sunilkumawat
Posts: 6
Joined: Wed Jul 25, 2018 10:09 am

Re: Quick selection tree

Hi Catalin,

I am once again in trouble. I hope I am not bothering you.

Case is when Modify applied:

1) If I select any feature only then I need to get database information from user. hence i applied DatabaseDlg box and its working fine.
2) If I deselect any feature only then I call VerifyReadyDlg that sets the value of MsiSelectionTreeSelectedFeature and worked fine too. let me correct if I am wrong.
3) But when I am going to uninstall a feature and install a new feature, I am stuck as I need to call DatabaseDlg box. As a result it does not uninstall deselected feature. However install new feature.

Please let know how can I achieve both the cases(Installing new feature having DatabaseDlg and uninstalling existing one in one shot).

Thanks
Sunil K
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Quick selection tree

Hello Sunil,

I am afraid I do not fully understand your scenario.

Do you want to display the "DatabaseDlg" only when a feature is selected for install ?

Also, when you deselect a feature from the quick selection tree, its default behavior is to be uninstalled.

Can you please give me some more details about your scenario ?

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sunilkumawat
Posts: 6
Joined: Wed Jul 25, 2018 10:09 am

Re: Quick selection tree

Hi,

Thanks for your solutions so far. Although I have solved the riddle now.

Thanks,
Sunil K
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Quick selection tree

Hello Sunil,

You're always welcome!

I am glad you got this working!

Regards,
Catlain
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”