I'm trying to have my application write into a text file. When the program is ran on a windows admin account it works but not when ran with a regular windows account. The application is not running as admin both times. Can the account the program is running on affect writing rights? Is there a way to work around it?
Both the directory and the file have write permission for any user.
I'm using the Append and WriteLn procedures from System.
The file is found in the Program Files dir although we change the access to our own directory to be writeable by regular users.
EDIT: Here's the code
var
f: TextFile;
AssignFile(f, sFile);
if not FileExists(sfile) then
begin
Rewrite(f);
end
else
begin
//Will append to the file
Append(f);
end;
Writeln(f, sInfo);
Flush(f);
CloseFile(f);