I am trying to write some code that will get the required information from an INI file created by me. The INI file will look something like this:
I have searched the forum and found thread329-1249823 written by stevio and it appears to describe what I need to do. There are amendments to the code posted by tsuji which I have also included but I am still having difficulty with the code. Firstly, without the amendments, the script will work but will hang (or continue searching) if the required [SECTION] cannot be found in the INI file. With the amendments, the script will also hang if the required [SECTION] cannot be found but also it does not pick up the required variables.
Please can anyone help with this?
--------------------------------------
"Insert funny comment in here!"
--------------------------------------
Code:
[AD]
USERSCONTAINER=USERS
DEPARTMENTCONTAINER=BILLING
[USER1]
USERID=BILL01
NAME=Billing ID 01
[USER2]
USERID=BILL02
NAME=Billing ID 02
Please can anyone help with this?
--------------------------------------
"Insert funny comment in here!"
--------------------------------------