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!

SteveGER
Posts: 6
Joined: Sat Sep 15, 2012 12:06 pm

Installing a feature or another. But not both.

Hi,

for example i´ve created my project and add some features (A, B and C). The user can see all three features in SetupTypeDlg but is able to install only A+C, B+C or one of them. In other words the user is not able to install feature A and B together.
Is there a possibility to do that?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing a feature or another. But not both.

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can take a look on the following articles:
- Show a custom feature selection dialog
- How to create dependencies between features

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
SteveGER
Posts: 6
Joined: Sat Sep 15, 2012 12:06 pm

Re: Installing a feature or another. But not both.

I´m sure this will be helpfull. I hoped it would have been more easier to handle like the perantal method. However, thank you.
SteveGER
Posts: 6
Joined: Sat Sep 15, 2012 12:06 pm

Re: Installing a feature or another. But not both.

Ok, i decided to add a new dialog with checkboxes for these features. Now i have a problem which i did not expect.
The files of feature A and B has the same names and shall be installed to the same path. But how can i say to the installer "install feature A or B" if the features are obviously the same?

Maybe i should give an explanation. I want to add some mods to a video game. In this special case there are two reticles (feature A and B). The user should have the choice to install A or B. But, of course, he can not install both.
I´m afraid i can´t achieve this but the hope is there.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing a feature or another. But not both.

Hello,

In order to obtain what you want you can take a look on our "How do I install file with the same name in the same folder?" article.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
SteveGER
Posts: 6
Joined: Sat Sep 15, 2012 12:06 pm

Re: Installing a feature or another. But not both.

Hi,

yea, that helped much and everything works fine now. Everything but one thing:
I´ve created a dialog with a combobox with three values (A = feature A, B = feature B, C = None). The install condition, i.e. for feature A, is COMBOBOX_1 = "A".
But after installation, if i want to add/remove features while using the maintenance dialog, the feature selected in the combobox won´t be remoed or replaced.

Maybe this is a bit off-topic but when this issue is solved the installer works nearly exactly how i imagined.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing a feature or another. But not both.

Hello,
But after installation, if i want to add/remove features while using the maintenance dialog, the feature selected in the combobox won´t be remoed or replaced.
I'm afraid I don't fully understand what you mean. Can you give us more details about your scenario (maybe exemplify)? Also, can you attach a sample reproducing the behavior?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
SteveGER
Posts: 6
Joined: Sat Sep 15, 2012 12:06 pm

Re: Installing a feature or another. But not both.

If I execute my project again after installation, the maintenance dialog pops up where I can choose the different types (add or remove features, repair/reinstall and remove).
Types.JPG
Types.JPG (25.29 KiB) Viewed 9941 times
I select "add or remove features" and this dialog pops up:
Maintenance.JPG
Maintenance.JPG (59.25 KiB) Viewed 9941 times
If i select/deselect a feature from the tree the installer add or removes it correctly. But if i choose one out of the combobox the installer doesnt replace the feature, if another is installed before, or removes it, if i select "none".

I hope I could give you the right information in spite of my limited english skills.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Installing a feature or another. But not both.

Hello,

I'm not sure I fully understand. Did you condition your features depending on the "ComboBox" control value and that doesn't work?
If so, can you please send us the project file (.AIP) to support at advancedinstaller dot com so we can investigate it?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
SteveGER
Posts: 6
Joined: Sat Sep 15, 2012 12:06 pm

Re: Installing a feature or another. But not both.

mihai.petcu wrote:Did you condition your features depending on the "ComboBox" control value and that doesn't work?
Yes, I did condition 2 of my 11 features depending on the ComboBox value and the installation works exctly how it should.
But what is not working is to replace or remove these two features by using the maintenance.

The ComboBox looks like this:

Property Name: COMBOBOX_1

Text: None
Value: A

Text: Feature1
Value: B

Text: Feature2
Value: C

The install condition for feature1 is COMBOBOX_1 = "B" and for feature2 COMBOBOX_1 = "C".

I´ve send you the .aip and I hope it will be helpful.

Thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Installing a feature or another. But not both.

Hello,

Actually there's no need to send the project file because those conditions will not be evaluated during maintenance.

The only approach for this to work on the same dialog is to have a custom action. It should be executed on the "Next" button of that dialog and it should set the feature states according to the "ComboBox" control value.

I attached a sample project which uses "Check Boxes" and "Radio Buttons" you can adapt:
CustomFeatureSelectionDlg.zip
(3.37 KiB) Downloaded 451 times
In case you're planning to have the ComboBox on a dialog before the one with the "QuickSelectionTree", you can use the predefined "Update Feature Install States" custom action.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”