golf4r
Posts: 11
Joined: Tue Feb 24, 2015 11:56 pm

How to input custom choices and change a filename accordingl

Hi,

I am building a msi that will install some files in a folder and start a service.

Prior to that, I would like the user to be able to select "Which Server" and have a dropdown to choose this server and based on his selection, there would be 16 config file and I would like the installer to rename one of these config file to .conf ( it would be file.conf.zone1, file.conf.zone2, file.conf.zone3 , etc. prior to the renaming ) .

This .conf file would then be used as the conf file to start the service and would be copied in the [ProductName]\conf\ folder as file.conf at the installation stage.

Is it possible ?

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

Re: How to input custom choices and change a filename accord

Hello and welcome to our forums,

You should be able to implement your installation scenario using Advanced Installer. To achieve this there is no need to rename your config file to "file.conf.zone1" on your build machine before including then in the setup project and, then at install time rename one of them back to .conf. You can simply add all of your .conf files in separate subfolders (zone1, zone2, etc) of their target folder (...\conf\) and then enable the "Install folder content into the parent folder" option of all the above subfolders.

Next, you should condition the component of your conf files to be installed based on the combo box value (you should use the combo box associated property). For instance, you should go to "Files and Folders" page and select the .conf file added in the "...\conf\zone1\" subfolder and from its context menu choose "Go To Component" option. Then, just add on the selected component a condition like this:

Code: Select all

COMBOBOX_PROP="zone1"
In order to get a starting point about how to cusomize installation dialogs you can take a look on our "Using the Dialog Editor" tutorials.

Let us know if this helped, otherwise please give us more details about your installation scenario.

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

Return to “Building Installers”