Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with creating text file

Status
Not open for further replies.

mischmasch

Programmer
May 10, 2011
11
Hi,

Any ideas why I get an error 'File access denied' all the time? Thx.

procedure CreateFile;
var
F: TextFile;​
begin
AssignFile(F, 'C:\test.txt');
ReWrite(F);
WriteLn(F, 'something');
CloseFile(F);​
end;
 
because you are not allowed to create a file under the root??
please google UAC and follow the design guidelines from microsoft when you develop windows applications...

/Daddy

-----------------------------------------------------
Helping people is my job...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top