Conditionally Set Install Directory Based On Radio List - 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!

tjams2
Posts: 6
Joined: Tue Jan 08, 2008 10:27 pm

Conditionally Set Install Directory Based On Radio List

I would like to set the installation directory based upon the selected item in a radio button list. I have created a custom dialog for this purpose, but I can't figure out how to wire it up. Can you please provide some guidance.
tjams2
Posts: 6
Joined: Tue Jan 08, 2008 10:27 pm

I thought I'd better provide some additional info to clarify. When the user selects one of the radio buttons as previously described and clicks next, it will have several affects:

1. The application directory will change accordingly
2. A property will be set indicating where to find some installation specific files so they can later be copied into the appliction directory
3. A property will be set that determines whether a database connection is needed and if so what the connection information will be.

Basically, I'm trying to support 4 possible installation scenarios with one installer rather than have to create separate installers.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
I would like to set the installation directory based upon the selected item in a radio button list.
This can be done by using a SetProperty Published control event (in the "Published Events" tab) for the "Next" button. This control event will look like this:

Code: Select all

[APPDIR]      my_dir      AI_INSTALL AND RADIO="my_item"
where:
- APPDIR is the property used by Advanced Installer for the installation folder ("Application Folder" in the "Files and Folders" page)
- my_dir is the new installation folder (for example "C:\" or "[DesktopFolder]"),
- RADIO is the property of the radio button group
- my_item is the radio button with the option to change the installation folder.

You can read more about the Events editor here:
http://www.advancedinstaller.com/user-g ... ditor.html
2. A property will be set indicating where to find some installation specific files so they can later be copied into the appliction directory
This can be done by using a "SetProperty" Published control event for the "Next" button.
3. A property will be set that determines whether a database connection is needed and if so what the connection information will be.
This can also be done by using a "SetProperty" Published control event for the "Next" button. Also, for the "Next" button you will use a condition based on the radio buttons to determine if the database connection dialog will be shown (we have a built-in dialog for configuring an SQL connection).

The control event which shows the connection dialog can look like this:

Code: Select all

NewDialog      SQLConnectionDlg      RADIO="my_item_connection"
where "my_item_connection" is the radio button with the database connection option. Note that the original "NewDialog" control event must also be conditioned (for example RADIO<>"my_item_connection") to ensure that if a connection is not needed, the connection dialog is not shown.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”