Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Reading & Passing Public Properties From External ini for Bootstrapped EXE Installer

I created a Feature-based exe installer with many MSI packages. I'm able to pass static property values (/qn APPDIR="[MAIN_APPDIR]\Integration" EFORMS_ENABLED="[EFORMS_ON]"),
MSI Property=EFORMS_ENABLED
Bootstrapped Property=EFORMS_ON

but I have some properties that will be different for each environment and I need a way to read from an external Settings.ini file and then pass those values to either the individual installers or to the bootstrapped exe installer.

My thought was to place the Settings.ini in the same location as the exe (this is how we did it with Wise Studio) or under [WindowsVolume], use Search/File Search to get the property values and pass it to either the MSI property or to the Bootstrapped Property during install. Is this possible without a CA or do you have another solution?
Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Re: Reading & Passing Public Properties From External ini for Bootstrapped EXE Installer

as an alternative, I tried using the Windows PowerShell Script from file custom action to set the property values instead of an ini file, but the values are not getting to installers.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Reading & Passing Public Properties From External ini for Bootstrapped EXE Installer

Hello and welcome to our forums,

To achieve what you want you can simply place the INI file alongside the EXE/MSI setup. Then you can add an INI search to get the requested values from the INI file.

Here is how you should proceed:
1. go to "Search" page and add a new search using the [New Search] toolbar button
2. rename the added search item with your required property name (e.g. SEARCH_PROP); each search name actually is a property which is populated at install time with the search result
3. right click on the added search and use the "Add Location -> INI File" context menu option
4. fill the fields of "INI File Properties" right pane with the desired settings; the "Folder" field should be set to the following folder property reference

Code: Select all

[SOURCEDIR]
if your setup is built as an MSI or like this:

Code: Select all

[SETUPEXEDIR]
if the built setup is an EXE package.

Please take a look on our "Installer Properties" article for further references.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Re: Reading & Passing Public Properties From External ini for Bootstrapped EXE Installer

Thank you, I will try that!

I was able to get the external PowerShell custom action to work; I just had to add it to the Wizard Dialogs Stage instead of the Install Execution Stage.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Reading & Passing Public Properties From External ini for Bootstrapped EXE Installer

You're always welcome.

Just let us know when you need help.

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

Return to “Building Installers”