Questions tagged [ini]

The INI file format includes text-based initialization information for programs. Its structure is composed of "sections" and "properties".

INI is a file format for saving configurations. They are basic text files with a specified format. An INI file contains key/value pairs, which are divided into sections. For example, an INI file for a mobile phone OS could look like this.

[graphics]
login_screen=mountains
desktop_back=earth_from_space
look_and_feel=classic_layout

[securite]
enable_password = true
;should a password be required to unlock the phone
password_on_unlock = true 
password = AC4d201cxDAc30F5AC4d201cxDAc30F5

A section name is put between square brackets. Each line after the section title contains a key/value pair, separated by an equals sign (=). Lines starting with a semicolon are comments.

The INI file format is not well defined, many implementations handle INI files differently. Some ignore whitespaces in key or value names, while some don't. Some implementations allow for the number sign (#) for comments, while some others don't.

1656 questions
0
votes
1 answer

VBScript that Opens an ini file and a Config file in notepad

I work in a hospital environment and right now im doing PC deployments. Part of the deployment requires us to view 2 files on a network drive looking for information regarding the old systems. They use specific ports and or TTY's to view information…
0
votes
3 answers

How to append values to a key using ini4j?

I want to append a value to following Key like this: [Section] Key=value1,value2 I tried Wini and Section getAll() and putAll() functions but it always replaces value1 with value2 instead of appending value2. And I did' t find any tutorial about…
xgdgsc
  • 1,367
  • 13
  • 38
0
votes
3 answers

Shell Script to read value set to zero and set back to old value?

I need to read a value of variable and set it to zero and again set back to old value I tried these steps value=$(grep -Po '(?<=Max_value=).*' /usr/post_check.ini|awk '{print $1}') sed -i -r 's/Max_value=[0-9]+/Max_value=0/g' /usr/master.ini echo…
JumpOffBox
  • 703
  • 3
  • 10
  • 19
0
votes
2 answers

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…
Paul Reiners
  • 8,576
  • 33
  • 117
  • 202
0
votes
2 answers

regex: return ini section as string

Using regex, (I am using Autohotkey, which is PCRE) how can I match the section of an ini file? I don't need to get the individual keys - just the section block. I've come up with this, which seems to match as long as there is a section after the…
bgmCoder
  • 6,205
  • 8
  • 58
  • 105
0
votes
2 answers

How to assign std::string in to other std::string in my class (overload = for string object).How to load an .ini file

I have below code as---> ConfigFile.h #ifndef __CONFIG_FILE_H__ #define __CONFIG_FILE_H__ #include #include const std::string SECTION1 = "SERVER"; class ConfigFile { private: const std::string PortNum; public: …
Astro - Amit
  • 767
  • 3
  • 15
  • 36
0
votes
1 answer

PHP session dropped when filename is stripped

This is a quick question, that has been bugging me for quite some time! I have a pagewww.example.com/dir/index.php which sets a $_SESSION variable. I access this variable again on www.example.com/dir/dir2/dostuff.php and this works fine! However, if…
Andreas Jarbol
  • 745
  • 2
  • 11
  • 27
0
votes
2 answers

Handling of time intervals in .ini settings files

I'm setting up a configuration file for a website, which will be read using the parse_ini_file method. One of the options is number of seconds prior to some action. I tried setting the value to 60*60*24*3 to get three day's worth of…
eykanal
  • 26,437
  • 19
  • 82
  • 113
0
votes
1 answer

How to add update and delete configuration on own ini configuration file using php?

I have created my own custom config.ini file and I want to have set of configuration inside in it and user can add new ini configuration with existing one and they may delete particular configuration from ini file. [section_one] test =…
PHPArtist
  • 61
  • 1
  • 2
  • 10
0
votes
1 answer

array with arabic value not showing and inserting into ini file properly

I am implimenting language module using ini file. So i am inserting lable and its value into ini file but the values are inserting like ??? ????? in arabic language. i have added //in header section
pankil thakkar
  • 411
  • 1
  • 5
  • 15
0
votes
2 answers

Reading and writting from an ini file (Config_Lite)

Alright so I've read around for a little while and so far the best solution I've found so far is: How to read and write to an ini file with PHP I've installed the pear package. included the required file initiated the class. as shown…
Neta Meta
  • 4,001
  • 9
  • 42
  • 67
0
votes
3 answers

Load data from config file with value from config file

I have a config.ini file with some values. One of them is the path to the root of my script. So in my js file i get the content from the config.ini file, but i have one big mistake. To load the data from the config file i already need one value from…
Sylnois
  • 1,589
  • 6
  • 23
  • 47
0
votes
2 answers

How to read config file entries from an INI file

I can't use the Get*Profile functions because I'm using an older version of the Windows CE platform SDK which doesn't have those. It doesn't have to be too general. [section] name = some string I just need to open the file, check for the existence…
1800 INFORMATION
  • 131,367
  • 29
  • 160
  • 239
0
votes
1 answer

How do you loop through an INI file using JS and/or PHP?

I need help developing JS code (or PHP if it will be easier and more efficient) that can loop through INI comments, sections, settings and their values. For example, this is my PHP:
Steven Waters
  • 55
  • 1
  • 10
0
votes
1 answer

Dynamically access dictionary declared in an .ini file

Let this is content of .ini file with more similar dictionaries [section] cmd_list = {'gamess': "416.gamess/exe/gamess", 'sjeng': '458.sjeng/exe/sjeng', 'soplex': '450.soplex/exe/soplex', 'astar':…
1 2 3
99
100