Solved

Windows 7 memo save to file.

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
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 …

919 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now