PDA

View Full Version : Reading INI data



bpetty
06-18-2009, 01:31 PM
I am building a few Unix installers and I need to be able to read .ini setting data.
I can not find anything in InstallAnywhere that would allow me to do this.
Essentially I'd like to store the ini values in InstallAnywhere variables that I can use to make logical decisions throughout the installation process.

I am expecting something that would take in a File Name, Section Name and Key Name and allow me to store the value.

Thanks!

pv7721
06-19-2009, 03:39 AM
I'm not sure how your .ini files are structured, but if they resemble to .properties files (variable=value) you can try to use the PropertiesFileReader plugin (available from here: http://www.acresso.com/downloads/customcode/PropertiesFileReader.zip (for more handy plugins you can check this page: http://www.acresso.com/downloads/downloads_7399.htm

bpetty
06-19-2009, 09:49 AM
Thanks pv7721,

I think that will work. The only difference between common .ini configuration files and java properties files is that INI files have a section. Since I dont have two keys with the same name under different sections, I think this will work for me.

Thanks!

bpetty
06-19-2009, 01:22 PM
Actually, PropertiesFileReader wont work.
We do have ini files that have the same key name in different sections.

Ex:

[section1]
key=value1

[section2]
key=value2


I'd think with how popular INI files are that InstallAnywhere would have support for reading them.