Search This Blog

Saturday, September 4, 2010

.INI Scripting

09:08:10PM, 04/09/10 AEST-09:23:00PM, 04/09/10 AEST

.ini files were basically the thing before Windows Registries. For more information on Registries, check out my blog posts on registries and the HackerPort posts on them (which go into more detail).

Now, .ini stands for initialisation and they are used to store runtime values (now DLL's are used), store log data (now .log and .txt files are used) and to store boot information and user preferences (now registries are used). Basically, initialisation files are pretty much under Windows legacy code. However, very interesting autorun files can be developed and implemented with relative ease if you know how. So in this post, I'll give you some basics on their coding.

Firstly, comments are denoted by a semicolon (for those of you who do programming languages, semicolons often represent the end of a line). E.g.

; This is a comment.


Now, a comment is not parsed (or read by) the system. They are merely there for other users, developers or anyone else.


Secondly, parameters have two parts. A name and a value. E.g.


name=value
date=04/09/10


These make up the most fundamentals of initialisation files.


Thirdly, sections help to organise these parameters. E.g.


;An example of some basics.
[section]
name=value


Finally, I use Notepad but any text editor should do, just type the code and save it as whatever you like, but always end it as .ini filetype.


Please comment for errors, questions or anything else.


Also, other links include:


http://hackerport.blogspot.com

http://www.en.wikipedia.org/wiki/INI_file

Enjoy!

No comments:

Post a Comment