Code: Alles auswählen
MyIniFile = "stapauf.ini"
IF fFileExist(MyIniFile)
sErgebnis = INIRead("Sektion","Keyword","",MyIniFile)
END
Der Grund dafür liegt in MyIniFile. Hier der ausschlaggebende Part in der Doku:
Die Lösung für dieses Problem geht dann so:If only the name of the file is specified, the specified file will be sought in the directory of Windows.
Code: Alles auswählen
MyIniFile = ".\stapauf.ini"
Um Probleme mit UAC unter Vista und Win7 zu vermeiden empfehle ich aber eher, die Datei im Verzeichnis SysDir(srCommonAppData) (alle Benutzer) oder SysDir(srAppData) (nur aktueller Benutzer) abzulegen.
Also so:
Code: Alles auswählen
MyIniFile = SysDir(srAppData) + ["\"] + "stapauf\stapauf.ini"