• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 560
  • Last Modified:

Windows 7 memo save to file.

I am using delphi 2010.

I am trying to save the lines in a memo to c:\ but getting errors , Can not create file access is denied.
Is this a win 7 issue ?

If i remove the c:\ it saves to the apps folder.

Memo1.Lines.SaveToFile('c:\readme.txt');

How can i save the lines to where i want (ie c:\grant) ?
0
Grant1842
Asked:
Grant1842
2 Solutions
 
mlmccCommented:
Does the directory GRANT exist?

You can't save to the root directory in Win7, it is read-only and protected by Windows.

mlmcc
0
 
Geert GruwezOracle dbaCommented:
uac is enabled

typically special locations like c:\, c:\program files\, c:\windows, c:\windows\system32 are protected then

if you run your program as admin, then it will work

why would you want to save to c:\ ?
0
 
Grant1842Author Commented:
Thanks for you help.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now