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!

shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Prerequisite installation based on the selected feature

Hi,

I have two requirements

Requirement 1:
I have added a new feature(i.e Organization->Product->New Feature->TSP). During the installation, in case the user selects this feature(i.e Dialogs->ConfigureDlg->Features->TSP), then installer should install a prerequisite(say Visual C++ 2010 Redistributable x86).

Requirement 2:
This new feature should be available only if "Micorosfot Outlook 2007 or higher is installed"(like Launch condition->Software), otherwise it should be disabled(and unchecked)

Can you please help me?

Regards,
Rohan
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Prerequisite installation based on the selected feature

Hi Rohan,

If your prerequisite is added as a feature-based or post-install prerequisite, then automatically a new feature is created in the Organization page.

Since you want to set this feature available only on the target machine where "Micorosfot Outlook 2007 or higher is installed" you select the Disabled Installation Behavior and add in the Installed if field the result of your search for each Outlook version. Please use this printscreen for your reference:
InstalledIFCond.png
InstalledIFCond.png (35.76 KiB) Viewed 7341 times
So, you need to create a new search in the Search page in order to check for each version of Outlook if it is installed.

Then, you can go in the Custom actions page and delete the Update features install state custom action (if it is pressent) and add it without sequence in order to add it as a init event on the ConfigureDlg. Please take a look on the How do I execute a custom action when a button is pushed? article which may be useful to you.

Also, I thing you can take advantage of the predefined Software Launch condition for the Outlook.
Here's what you can try:
1) Enable the related launch condition.
When this launch condition has been enabled, the search for the related software are performed by Advanced Installer for you. The result of the searches are filled in these properties:
AI_OFFICE2007_OUTLOOK_SEARCH OR AI_OFFICE2010_OUTLOOK_SEARCH OR AI_OFFICE2010_OUTLOOK_X64_SEARCH OR AI_OFFICE2013_OUTLOOK_SEARCH OR AI_OFFICE2013_OUTLOOK_X64_SEARCH
2) Go to the Table Editor page and in the LaunchCondition table, delete this row (so you can run your installation package on the machine where there is not Outlook installed).
3) Add this statement in the Installed if: field of your feature.
4) Go in the Custom actions page and delete the Update features install state custom action (if it is pressent) and add it without sequence in order to add it as a init event on the ConfigureDlg. Please take a look on the How do I execute a custom action when a button is pushed? article which may be useful to you.
Please find the attached sample project for your reference.

Let me know if that worked as expected.

Best regards,
Dan
Attachments
LaunchConditionTrick.aip
(20.24 KiB) Downloaded 439 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Prerequisite installation based on the selected feature

Thanks. I will try these, and get back to you.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Prerequisite installation based on the selected feature

You're always welcome Rohan,

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Prerequisite installation based on the selected feature

Thank you Dan. Solution provided by you worked fine. I do appreciate your help.
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Prerequisite installation based on the selected feature

Hi Dan,

Can you please help me with the following
-I have added a new feature(i.e Organization->Product->New Feature->TSP). During the installation, in case the user selects this feature(i.e Dialogs->ConfigureDlg->Features->TSP), then installer should install a prerequisite(say Visual C++ 2010 Redistributable x86).

Regards,
Rohan
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Prerequisite installation based on the selected feature

Hi Rohan,

If your prerequisite is added as a feature-based in the Prerequisites page, then automatically a new feature is created in the Organization page.
In the Organization page you can move this feature according your scenario by using a drag and drop operation.

You can also take a look on the Multiple Prerequisite per Feature forum thread which may be useful to you.

Please let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Prerequisite installation based on the selected feature

Thanks. Understood :-)
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Prerequisite installation based on the selected feature

You're always welcome Rohan,

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”