On Tuesday 15 of March 2011 05:25:41 Peter Williams wrote: > Hi All, > I use this procedure to save an inifile using the standard IniFiles unit. > The problem I have is that when an .ini file already exists I cannot > overwrite it. I need the TextFiles equivalent of Rewrite() for Inifiles. > This line: ConfigIni := > TIniFile.Create(ChangeFileExt(Application.ExeName, '.ini'));... when the > ini file exists fails with an error message of 'unable to create > appname.ini'. This is because it cannot create an ini file which already > exists. How then do I rewrite the .ini file?
I've seen such problem with fpc-2.4.3 under win7 64bit only. My workaround is to use TMemIniFile instead of TIniFile. So try that first. zeljko -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus