Look at the EnumIni UDF - either for ideas or use it as-is.. it does all the heavy lifting of reading the INI (just like you are) and assembling the array.

It is also forgiving about the vars you pass, in fact - it doesn't want them!
 Code:
$aSections = EnumIni($IniFile)  ; return an array of sections in the INI file

$aValues = EnumIni($IniFile, $Section) ; return an array of values within a section
Often, you'll use the first form and enumerate the list of sections, sometimes excluding certain sections such as "COMMON" or "SETTINGS" which contain app settings. The remaining sections might need to be enumerated to gather specific information, such as a file containing a collection of tasks to perform.

The second form returns the list of VALUES, but not any data. This generally is enumerated to perform the specific ReadProfileString($IniFile, $Section, $Value) to get the actual data.

Looking at the EnumIni code, it seems that the delimiter is newline ( Chr(10) ) and not @CRLF. Sorry about that!

FYI - the latest version of any of my UDFs is available from my web site - I have a Kix service that runs to sync my UDF lib with the web site, running PostPrep in the process. It also creates a Zip file of all the UDFs for quick access to everything.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D