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!

tschneider
Posts: 2
Joined: Thu Feb 13, 2014 10:44 pm

install feature to different folder based on checkbox state

hi,

ihave following problems
- how can i install a feature to a different folder than appdir, based on a checkbox state placed in installdlg

background:
i dont want to display custom dialog, only one checkbox is needed and this were displayed in the InstallDlg.
if the user checked this, the installer should create a folder in program files and copy some files to it.

how can i do this?

thomas
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: install feature to different folder based on checkbox st

Hello Thomas and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can create the desired folder (e.g. MY_FOLDER) under "Program Files" directory from "Files and Folders" page and add the related files into MY_FOLDER folder. Then, you can use the property associated with your check box control (e.g. MY_CHECKBOX) to condition the installation of your files components. Here are the steps to proceed:
- go to "Dialogs" page and on "InstallDlg" dialog add a check box control (MY_CHECKBOX)
- go to "Files and Folders" page and under "Program Files" directory create your folder (e.g. MY_FOLDER)
- add your files into MY_FOLDER directory
- use "Go To Component" context menu option of your files to select the files components from "Organization" page
- in the "Condition" field of your files components add the following condition:

Code: Select all

MY_CHECKBOX
- build and run your project

If you have any questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tschneider
Posts: 2
Joined: Thu Feb 13, 2014 10:44 pm

Re: install feature to different folder based on checkbox st

Hi Daniel,

thank you for your help it works so far but let me ask a further question according to this issue.
I have a prerequisite to install based on that condition (CHECK_PROP) discribed below, so how can i achieve this.

There is no condition rule in prerequisite tab to set this.

best Thomas
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: install feature to different folder based on checkbox st

Hello Thomas,

In order to achieve this you can add your prerequisite package as a feature-based prerequisite and, then configure its associated feature from "Organization" page to be installed based on condition (CHECK_PROP). For example, you can set the prerequisite feature installation behavior to "Not installed", click on "Add Install-time Conditions" hyperlink and in the "Installed if" field use the CHECK_PROP property.

If you have any questions just let us know.

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

Return to “Building Installers”