Custom Prerequisite Dialog - 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!

Firefly
Posts: 9
Joined: Tue May 11, 2010 9:37 am

Custom Prerequisite Dialog

Is it possible to show a dialog or two before installing a prerequisite?

I want the user to be able to input some parameters and then parse those as command line parameters to the prerequisite about to be installed.

If this is possible could you give me a simple project or instructions/tutorial on how to do this.

Cheers.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Custom Prerequisite Dialog

Hello,

This is not possible. Could you explain why you would need this behavior?

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Firefly
Posts: 9
Joined: Tue May 11, 2010 9:37 am

Re: Custom Prerequisite Dialog

Damn.

I thought I had explained why I need it. I'm installing SQL and want to pass it command line options based on some things the user has keyed in on a dialog beforehand.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Custom Prerequisite Dialog

Hi,

This can be done very easy. You will need the prerequisite to be set as feature based and then create the dialog from which you can capture the user input.

Then you can go to Prerequisites page and set the "Command Line" field of the prerequisite like this for example: /password=[MY_PASS] /user=[MY_USER]
Assuming that MY_PASS and MY_USER are the properties attached to the edit control from the dialog you have added.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Firefly
Posts: 9
Joined: Tue May 11, 2010 9:37 am

Re: Custom Prerequisite Dialog

What do you mean by "set as feature based"?

I'm still unsure how you would link the new dialog with the prerequisite so that it is shown before running the prereq's setup file.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Custom Prerequisite Dialog

Hi,

To set the prerequisite as a feature based one you can follow these steps:
-- go to "Edit Prerequisite" dialog, "Options" tab
-- here select the "Feature-based ...." radio button
-- this will make you prerequisite to be launched during the installation of your main package, more exactly after you press
"Install" button

So what you have to is to add the new dialog before the "VerifyReadyDlg" just as it was shown in the tutorial from my previous reply.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Firefly
Posts: 9
Joined: Tue May 11, 2010 9:37 am

Re: Custom Prerequisite Dialog

As far as I can tell this would force the prerequisite to always be installed.

How would you disable the dialog from showing up if the prereq is already installed?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Custom Prerequisite Dialog

Hi,

No, the prerequisite will not be forced to install if you select the option "Feature-based ...". This will only make the prerequisite installation
to start during the main installation of your package.

If the install conditions of your prerequisite are fulfilled (i.e. it is already installed) the prerequisite will not run anymore.
You can easily test this by installing the prerequisite before you launch the main package.

If the prequisite is still launched even though it is installed on the machine then it means the "Install Conditions" for it are not correctly set.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Firefly
Posts: 9
Joined: Tue May 11, 2010 9:37 am

Re: Custom Prerequisite Dialog

Ok that makes sense. I still have the question of how to not show the custom dialog if the prerequisite isn't going to be installed. Is there a way I can check a condition to say whether or not my new SQL options dialog will or will not be shown. Is there a global property for each prerequisite that says whether or not it needs installing?

Also, how do you set a default path for a PathEdit control? I can't seem to use [ProgramFilesFolder] in the Default Value section.

Thanks!
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Custom Prerequisite Dialog

Hello,

You can check our guide on Conditionally displaying an install dialog. It should help you not display that dialog when not necessary.

Use a Property Set with Formatted custom action to set the property of the PathEdit control to the appropriate path. Make sure you set it in the InstallUISequence, before WelcomeDlg is displayed.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Firefly
Posts: 9
Joined: Tue May 11, 2010 9:37 am

Re: Custom Prerequisite Dialog

Thanks. Sorry to be a pain but I have one more question (which you missed in the last post) and that is - is there conditions setup for built-in prerequisites that I can already use to determine when to show the dialog. If not, whats the best way of creating a "IS INSTALLED" condition for prerequisites.

Thanks again.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Custom Prerequisite Dialog

Hi,

I'm afraid you cannot use directly the searches used by built-in prerequisites. However you can create your own searches very easy form the
"Search" page and you can analyze the ones existent on the predefined prerequisite if you need.

From the Search page you can create file or registry searches, Product Code searches and extended searches too.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”