Hiding Components in Customize Dialog - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Hiding Components in Customize Dialog

Hi,

Below is the Organization Structure (Components) in my installer.

Common Main 1
Common Main 2
Product 1
Child 1_1
Child 1_2
Product 2
Child 2_1
Child 2_2
Product 3
Child 3_1
Child 3_2

In the installer on some condition basis I do not want to display some component in Customize Dialog and it should not be installed.
For example, let say user purchased license for Product 1 only, then Product 2 and Product 3 should not be displayed in Customize Dialog.
And if later on user purchase license for Product 2 also then in the same installer [when user run the same installer] only product 1 and Product 2 should be displayed in Customize Dialog.

How can I achieve that? Please help

Thanks
Amit
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Hiding Components in Customize Dialog

Hi Amit,

Here is what you can try:
-- in the Organization page you can select a feature and have displayed in the right pane the Feature Properties
-- on this page you can find the "Conditional install level" hyperlink
-- when clicking on it you will get displayed the Edit Conditional Levels dialog
-- here you can set conditions that will make the feature to be available or not depending on a property for example
-- please note that the property must be set before the CostFinalize standard action from the InstallUISequence
-- you can use the "Property Set with Formatted" custom action to set the value of the public property

-- if you need to set the value of the property after CostFinalize standard action then you can try the approach presented in this article.

Please let me know if you have any questions.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: Hiding Components in Customize Dialog

Hi Bogdan,

Thanks for reply.

I want to provide an option to user to select License.xml file.

How can i do that.

Thanks again for help.

Amit
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Hiding Components in Customize Dialog

Hi,

The user guide contains the Browse for file tutorial which may help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: Hiding Components in Customize Dialog

It is useful.

Thanks a lot
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: Hiding Components in Customize Dialog

Hi

Can I set "Feature Tree" property in Organization using vbscript file.

I want to set this property as "Not Display" on condition basis.

I checked with "Condition install level", in this case it marked the components Crossed (X), but user can select it again. I do not want that.

Please help me.

Thanks
Amit
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Hiding Components in Customize Dialog

Hello,

Using the Condition Install Level option, set the level to 0 and your feature will not be displayed in the tree anymore. Details about what each value means can be found on the Feature Properties page.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: Hiding Components in Customize Dialog

Hi
Thanks for reply.

Can i set the same using vbscript?

Amit
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Hiding Components in Customize Dialog

Hi,

Yes, the User Guide contains a how-to which may help you. Initially the feature can be disabled so it's not shown in the feature selection dialog, but the script can set it to install when you want. Please note that using conditional install levels is recommended and much easier.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: Hiding Components in Customize Dialog

Hi Cosmin,

Thanks for reply.

I do not want to create New Dialog that will contain checkbox for each feature, why because Currently I have 14 Features (organization) and it will increase in future.

I want to use CustomizeDlg, where all available Features (organization) comes automatically and all operation will be available.

I want to hide some Features (organization) on the basis of some condition which will be give in my 4-5 Dialog means after CostFinalize that means i can not user "Condition Install Level".

Please sugget me is there any way to hide the Features (organization) on CustomizeDlg on condition basis.

Thanks
Amit
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Hiding Components in Customize Dialog

Hi Amit,

Like I mentioned in my previous post, the features can be disabled by using the Feature Properties pane in the "Organization" page. After that, you can use a custom action to set the features you want to install. You can find some sample code in the how-to I mentioned (this is why I mentioned it).

Basically, when the installation starts the features are disabled, so they will be hidden. However, you can run the custom action before "SetupTypeDlg" to show the features you want.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”