Mapped INI Files
Keywords: Mapped INI Files
Question:
(Using Winbatch 99D)I have a script which is using INIItemizePvt to read an INI file and present the contents as a menu to the user. The syntax I'm using to read the sections of the file is as follows:
INIFILE=strcat(DirWindows(0),"PRINTERS.INI") floors=iniitemizepvt("",INIFILE)The second line above produces the error "Null section name not valid for mapped INI files". What's a mapped INI file? This script worked fine in Winbatch 97x.Answer:
- Try...
INIFILE=strcat(DirWindows(0),"PRINTERS.INI") if !FileExist(INIFILE) Message("Eeeop","might be a mapped file") endif floors=iniitemizepvt("",INIFILE)- A mapped ini file is one that is not in a real ini file, but rather exists in the registry. When Inicommands are issued, instead of going to the file on disk, the ini settings in the registry are consulted instead.
Article ID: W13341Filename: Mapped INI Files.txt