Solved

Windows 7 memo save to file.

Posted on 2012-03-24
3
519 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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