ini-files

How to initialise a C program using file, environment and/or command line?

In C, how to configure the initial settings for some program, using key-value pairs, with any or all of: a plain text configuration file, environment variables, and options on the command line. Also, how to decide which method's values overide those from either of the other two. Then if values have been changed, to optionally update the ...

Match INI Section Blocks

I'm using regular expressions to try to match section blocks in an INI file. I'm using the recipe given in the book Regular Expressions Cookbook, but it doesn't seem to be working for me. Here is the code I'm using: final BufferedReader in = new BufferedReader( new FileReader(file)); String s; String s2 = ""; while((s = in.readLin...

How to read custom values from INF file in Inno Setup?

Setup programs created with Inno Setup could read an INI file through /LOADINF option. Is it possible to read custom variables through this INI file? Is there a function to get the name of the INI file given with this option? (Then it is possible with the INI utility functions.) ...

PHP parse_ini_file() performance?

I know some people store settings in an .ini file and get the values with parse_ini_file() in PHP. Without running tests, I am curious about performance. Do you know if opcode cache can cache any of this type of stuff if setting are in an ini file? ...

Access ini file from documents for reading

Hi everyone, I have put a config ini file "config.ini" for reading and writing to from my C# program, the thing is, if the user has UAC enabled then for some weird reasons the program doesn't read or write to the file but it managed to create the file but cannot read or write to it. How can I get this to work. this file is saved into ...

PHP: Escape illegal chars in .ini-files

The documentation on parse_ini_file states that you can't use these chars {}|&~![()^" in the value. Is there some way to escape these chars? I need to use them. Normal escaping with \ doesn't seem to work. ...

How can I write to a single xml file from two programs at the same time?

We recently started working with XML files, after many years of experience with the old INI files. My coworker found some CodeProject sample code that uses System.Xml.XmlDocument.Save. We are getting exceptions when two programs try to write to the same file at the same time. System.IO.IOException: The process cannot access the ...

Are there any tools for modifying INI style files from shell script

I'm building a custom package of vnc and would like to ensure the xdcmp settings of GDM are enabled in the package post install script. The gdm.conf file is an ini style one, i.e.: [section] var=name And the value I want to set has name clashes in different sections throughout the config file. Are there any tools that allow for easy m...

PHP parse_ini_file TC_CONSTANT warning

I've got a weird issue, weird as in nothing comes up on Google. I'm trying to parse an ini file full of HTTP status codes, StatusCodes.ini. I've tested in three different environments, locally (WAMP) on a shared host (Hostmonster.com) and now on a dedicated machine running CentOS w/ CPanel/WHM. The first two environments seem to work fin...