Solved

Windows 7 memo save to file.

Posted on 2012-03-24
3
524 Views
Last Modified: 2012-03-25
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
Comment
Question by:Grant1842
3 Comments
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 50 total points
ID: 37762227
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
 
LVL 37

Accepted Solution

by:
Geert Gruwez earned 450 total points
ID: 37762557
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
 
LVL 12

Author Closing Comment

by:Grant1842
ID: 37762743
Thanks for you help.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question