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!

lidds
Posts: 44
Joined: Thu Jun 14, 2012 11:22 pm

Do not install prerequisite depending on selection...

I have built an installer that I want to use for both a trial and licensed version of my software.

I have therefore allowed the user to select what type they are installing e.g. Trial or licensed. On my installer I have added SQL Server 2005 as a prerequitie, however I only want this to be installed if they have selected trial version as an option. I have made the installer skip the prerequisite page of the installer depending on the users selection, however on the install page it still downloads SQL Server and tries to install it. When I looked at the prerequisites options it only allows things like check for registry keys etc. And does not allow the option to say only install if trial radio button is selected?

Is there a way that I can tell the installer to only install SQL Server if the trial radio button is true and to skip the installation if the licensed radio button is true?

Thanks

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

Re: Do not install prerequisite depending on selection...

Hi Simn,

Until our latest version you could not condition features with UI public properties unless using custom behavior.

Since the predefined SQL Server 2005 prerequisite is by default added as feature based, I guess you already conditioned its feature from the Organization page using the radio selection.
Aside this you'll also need to add "Update Features Install States" predefined custom action from the Custom Actions page. ( Advanced Installer 9.3 )

Starting with the next version of Advanced Installer, adding that custom action won't be necessary.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lidds
Posts: 44
Joined: Thu Jun 14, 2012 11:22 pm

Re: Do not install prerequisite depending on selection...

Mihai,

Thanks for the advise. I have now implemented under the Installation Behaviour section on the Orginazation page the following condition:

InstallType = "Trial"

Which does not install SQL Server prerequisite if the user does not select the Trial option on the installer. The only problem I have is if the user does select the Trial option then it displays the SQL Server 2005 in the prerequisite page but is automatically set to install mode of SKIP. I need this to always be MUST INSTALL and also not allow the user to change this option.

How can I fix this???

Thanks

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

Re: Do not install prerequisite depending on selection...

Hi Simon,

Since you want this to be always installed I would first recommend you remove the prerequisites dialog from the project as it is useless.

To force the install we have an option called "Always install" in Prerequisites page, under Install Conditions tab of your selected prerequisite.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lidds
Posts: 44
Joined: Thu Jun 14, 2012 11:22 pm

Re: Do not install prerequisite depending on selection...

Bogdan,

I have tried doing what you suggested but it still keeps saying that the prerequisite is "SKIPPED" in the prerequite form. I will remove the prerequisite form later but just leaving it in place for testing purposes.

I have attached a PDF document that has screen shots of my setting, hopefully this might help??

Thanks

Simon
Attachments
AdvancedInstaller.png
AdvancedInstaller.png (299.88 KiB) Viewed 17049 times
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Do not install prerequisite depending on selection...

Hi Simon,

Are you using the latest version of Advanced Installer, i.e. 9.3? I just tested this with two prerequisites, see attached project file, the .NET 4.0 prerequisite is installed on my machine but it still allows reinstall, i.e. it does not set it to be skipped, when "Always Install" is set.

Regards,
Bogdan
Attachments
sample.aip
(23.51 KiB) Downloaded 873 times
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lidds
Posts: 44
Joined: Thu Jun 14, 2012 11:22 pm

Re: Do not install prerequisite depending on selection...

I have modified your example to replicate the problem. You will notice I have SQL Server x64 and 32 as URL downloads, with the conditions for them to install the appropriate installer depending on OS. I have also add a radio group that the user must select to determine if they are installing a Trial or Licensed version of my application. You will notice that it always displays SQL Server in the prerequities form even if the user selects Licensed type, and also if the user selects Trial type it displays SQL Server in the prerequities but as SKIPPED.

What I want is the following:

User Selects Trial Option

Always install SQL Server x64 or 32 depending on OS

User Selects Licensed Option

Installer does not install SQL Server

Also I am using Advanced Installer 9.3

Thanks for your help

Simon
Attachments
sample.aip
(21.04 KiB) Downloaded 860 times
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Do not install prerequisite depending on selection...

Hi Simon,

The modified project is incomplete. As my colleague Mihai explained you need to call the custom action "Update feature states" when you are using a public property set from an MSI dialog as condition for a feature. Please add it to your project.

Also, since you don't want to install the prerequisites when the user selects "Licensed" radio button you should also skip the prerequisites dialog. Just right click on it and select "Show only if", than set the same condition you have placed on your features.

Even if the prerequisite appears in the list when selecting "Licensed" button, which the user will not see as the dialog is skipped, the package will not install it as the predefined custom action "Update feature states" will change its install behavior.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lidds
Posts: 44
Joined: Thu Jun 14, 2012 11:22 pm

Re: Do not install prerequisite depending on selection...

Bogdan,

Thanks for the information.

Is it possible for you to modify my previously attached project to include the "Update feature states" custom action as I don't think I am doing this properly?

Thanks

Simon
lidds
Posts: 44
Joined: Thu Jun 14, 2012 11:22 pm

Re: Do not install prerequisite depending on selection...

Any news on my previous post
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Do not install prerequisite depending on selection...

Hello,

There's no need to add another sample project or modify the existing one. Just go to Custom Actions page and add "Update Features Install States" predefined custom action leaving its default settings.

This should enable the installer to evaluate the feature conditions which use UI public properties. If you already tried this, can you please specify what's your current show stopper?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lidds
Posts: 44
Joined: Thu Jun 14, 2012 11:22 pm

Re: Do not install prerequisite depending on selection...

Milhai,

Thanks for the update, however I am still really struggling to get this to work. I have added aq "Update Feature Install State" and left it as default but added my condition.

The problem I still have is that when I select the Trial radio button it displays the SQL Server prerequite as having an option of SKIP. However I have told it to always install SQL Server prerequite.

I have uploaded the project, your help would be really apreshiated as I am keen to release the new version of my software.

Thanks and sorry to be a pain

Simon
Attachments
sample.aip
(21.33 KiB) Downloaded 731 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Do not install prerequisite depending on selection...

Hello Simon,

Can you please remove any condition from the custom action and leave the defaults like I suggested in my previous post?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lidds
Posts: 44
Joined: Thu Jun 14, 2012 11:22 pm

Re: Do not install prerequisite depending on selection...

Mihai,

I have removed the condition from the custom action bat I am still facing the problem.

The problem I still have is that when I select the Trial radio button it displays the SQL Server prerequite as having an option of SKIP. However I have told it to always install SQL Server prerequite.

I have uploaded the project, your help would be really apreshiated.

Simon
Attachments
sample.aip
(21.32 KiB) Downloaded 1375 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Do not install prerequisite depending on selection...

Hi Simon,

I see what you mean but unfortunately there's nothing you can do to update the dialog with the current version. However, our next version has the fix because it allows adding "Update Features Install States" custom action without sequence.
By adding it this way and executing it with a "DoAction"("Execute custom action") published event on the "Next" button from the "WelcomeDlg", the "PrerequisitesDlg" should be updated accordingly.

FYI: The next Advanced Installer release should be out by the end of this month.

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

Return to “Building Installers”