Solved

Windows 7 memo save to file.

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

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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 this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

21 Experts available now in Live!

Get 1:1 Help Now