Conditional feature - 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!

gvasko
Posts: 33
Joined: Mon Jun 07, 2010 7:11 pm

Conditional feature

Hi,

I am trying to solve an otherwise simple task, but I failed several times and it seems I can't find further help on your forum.

I would like to handle two features, but one of them would be installed only when a particular registry value is set to a desired value.

I checked this: http://www.advancedinstaller.com/forums ... f=2&t=8109, and it seems quite simple, but I do something wrong.

These are my steps:
1/ New enterprise project.
2/ Two features (First and Second).
3/ Files added to both features.
4/ I made a search for the desired registry value.
5/ Second feature is installed only if INSTALLLEVEL is greater than 3
6/ Conditional install level
Registry value="" (empty string), level=1;
Registry value="..." (the desired value), level=4;

BTW, I don't understand why the value of the INSTALLLEVEL is 3 by default.

I added a "debug dialog" where I can see the value from the registry and it is correct.
I can also see here that INSTALLLEVEL is always 3 after the welcome screen.

And my experiences:
1/ If the registry value is not set (empty string), both feature is installed.
2/ If the registry value is set to the desired one, only the first feature is installed.

It seems it is the opposite. Or did I misunderstand something?

Could you help me, please?
We are using 7.3.1.

Thank you in advance,
Gabor Vasko
Attachments
TestConditionalFeature.aip
(10.39 KiB) Downloaded 368 times
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Conditional feature

Hello,

In your project, you are setting the "Second" feature's install level to 1. That means installed, just like 4. You will want to set it to 0 if the search result property doesn't have the value "4.4.4". This will hide the feature and will not install it.

I hope this helps.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
gvasko
Posts: 33
Joined: Mon Jun 07, 2010 7:11 pm

Re: Conditional feature

Thank you very much, it works.
Gabor Vasko

Return to “Common Problems”