AIPxx
Posts: 2
Joined: Fri Jul 11, 2014 2:03 pm

Install prerequisite based on condition

Hi,

we are trying to achieve a simple condition based PreReq install, but for some reason it does not work. Please advice!

This is what's supposed to happen. The user is presented with two options:

1. Install SQLExpressAdvanced2012 and deploy DB (Radiobtn1)
2. Use an existing local SQLServer to deploy DB (Radiobtn2)

Setup:
-CustomDlg with a RADIOBUTTONGROUP_1 and two Radiobtns (values: Radiobtn1 & Radiobtn2)
-SqlConnectionDlg which is only shown when RADIOBUTTONGROUP_1_PROP = Radiobtn2
-SQLExpressAdvanced2012 added as feature based PreReq

However, no matter what we set as Installation Behaviour for the SQLExpressAdvanced2012, the condition based PreReq does not honor the selected options. This is what we have tried:

1. PreReq disabled. "Installed if" condition set to RADIOBUTTONGROUP_1_PROP = Radiobtn1.
Does not work - PreReq still get's installed when Radiobtn2 is selected.

2. PreReq installed. "Not Installed if" condition set to RADIOBUTTONGROUP_1_PROP = Radiobtn2.
Same problem - PreReq still get's installed when Radiobtn2 is selected.

3. PreReq disabled. "Installed if" condition set to RADIOBUTTONGROUP_1_PROP = Radiobtn1. "Not Installed if" condition set to RADIOBUTTONGROUP_1_PROP = Radiobtn2.
Does not work either - PreReq still get's installed when Radiobtn2 is selected. This also evaluates incorrectly when clicking the "More Options" (evaluates to: RADIOBUTTONGROUP_1_PROP=Radiobtn1 -> Level1, RADIOBUTTONGROUP_1_PROP=Radiobtn2 -> Level4, Default -> Level0)


This looks like a bug to me, or maybe we are doing it wrong. Any advice is greatly appreciated...

Thanks

B.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install prerequisite based on condition

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I'm not sure why you are encountering this behavior. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install prerequisite based on condition

Hello,

I've updated this thread in order to have a resolution for future users facing with the same issue (Feature-based prerequisites are not correctly triggered for installation when using conditions, on their associated features, resolved during UI dialogs). This is an Advanced Installer issue and a fix will be added in a future version of Advanced Installer, thank you for bringing this to our attention. We'll update this thread as soon as a fix will be out.

This happens because our "Update Features Install States" custom action is added by default after the install prerequisites custom action, therefore the install condition of the feature associated with the feature-based prerequisite are not evaluated before the prerequisite installation is triggered. As a workaround, in order to avoid this issue, you should move (in "Custom Actions" page) the "Update Features Install States" action before "Wizard Dialogs Stage -> User Selection -> ProgressDlg" standard action.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Aiad
Posts: 2
Joined: Sun Jul 13, 2014 1:09 pm

Re: Install prerequisite based on condition

OK, thanks, I hope the update will be very very very soon.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install prerequisite based on condition

You're welcome. We'll notify you when this fix will be out.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ketteringkid
Posts: 14
Joined: Thu Mar 20, 2014 8:30 pm

Re: Install prerequisite based on condition

Was this fixed? I think I am running into this since I have upgraded from version 11.7.1. The workaround doesn't seem to work either.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install prerequisite based on condition

Hello,

I'm afraid this is still on our TODO list. We'll update the thread as soon as the fix will be out.

In order to have a clear view of your installation scenario, can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

Also, if you could isolate the behavior in a buildable sample (.aip + its referred files) this would be great.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install prerequisite based on condition

Hello,

This is an update regarding this issue. Unfortunately our development team cannot fix this issue because of a Windows Installer API limitation. Due to a limitation of the Windows Installer API, our custom action cannot update the state of a feature whose state was originally set to Disabled. This is not allowed by Windows Installer.

As a workaround solution, to avoid this limitation you can set by default your feature installation behavior to Not Installed.

Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”