Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: IniItemizePvt AskItemList IniReadPvt
In the example below, note that you will need to provide the full path to your INI file, if it is not located in the \Windows or \Windows\System subdirectory. Otherwise, the function will return a null string since it can't find the INI file.
So your script would look something like...
inifile="www-prod.ini" iniall=IniItemizePvt("",inifile) ; Get sections in win.ini inisection=AskItemList("Choose a section",iniall,@tab,@sorted,@single) inikeywords=IniItemizePvt(inisection,inifile) inicount=ItemCount(inikeywords,@tab) line="" for xx=1 to inicount inicurrent=ItemExtract(xx,inikeywords,@tab) inivalue=IniReadPvt(inisection,inicurrent,"???",inifile) line=strcat(line,inicurrent," = ",inivalue,@tab) next AskItemList("The Ini Section",line,@tab,@sorted,@single)
Article ID: W13334
Filename: Display Items in an INI file in an Itembox.txt
File Created: 1999:04:15:16:53:20
Last Updated: 1999:04:15:16:53:20