I don't really get what exactly you cod is supposed to act on, but I used a fluffed ini with the contents:
[App1]
version=version 0.1
setup=setup true
User=Username
Password=mypass
MSI=install.msi
filesize=6.2 meg
filetime=1952
[app2]
version=version 0.2
setup=setup true
User=Username2
Password=anotherpass
MSI=install.msi
filesize=8.1 meg
filetime=1958
The sample code:
Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode",1)
local $sections = IniReadSectionNames(@ScriptDir &"\CHSofT.ini")
For $i = 1 To $sections[0]
TrayCreateItem($sections[$i])
TrayItemSetOnEvent(-1,"_runme")
Next
TrayCreateItem("Exit")
TrayItemSetOnEvent(-1,"_runme")
While 1
Sleep(50)
WEnd
Func _runme()
$sect=TrayItemGetText(@TRAY_ID)
If $sect="Exit" Then Exit
$prog1=IniRead(@ScriptDir &"\CHSofT.ini", $sect, 'setup', 'Error reading file')
$prog2=IniRead(@ScriptDir &"\CHSofT.ini", $sect, 'MSI', 'Error reading file')
;~ _runme($sect,$prog1,$prog1) is the equivalent of _runme($sections[$i],$prog[$i][2],$prog[$i][5]))
;~ Though you can do you function stuff here now and retrive anything from the ini under $sect.
MsgBox(0,"",$sect &" | "& $prog1 & " | "& $prog2)
EndFunc