Re: Copying File to Program Directory
- From: "Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx>
- Date: Sun, 18 Mar 2007 14:06:13 +0100
"pooba53" <pooba53@xxxxxxxxx> schrieb:
My VB .NET application (created in VS 2003) resides in c:\Program Files
\Test\ and there's a data.mdb (Access) file within this directory.
I have a feature in my program that allows the user to import a backup
copy of this Access db if they need to.
I'm using the FileCopy method to simply copy over the data.mdb file
within the directory above. However, I get a
"System.UnauthorizedAccessException: Access to the path: c:\Program
Files\Test\data.mdb denied" when the copy is attempted.
I have admin rights to my XP computer and am wondering if this is some
sort of security issue. How does one write to the application
directory?
With administrator privileges this should work. However, it won't work for normal users.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
.
- Follow-Ups:
- Re: Copying File to Program Directory
- From: pooba53
- Re: Copying File to Program Directory
- References:
- Copying File to Program Directory
- From: pooba53
- Copying File to Program Directory
- Prev by Date: Re: Is VB Caca??
- Next by Date: richtextbox
- Previous by thread: Re: Copying File to Program Directory
- Next by thread: Re: Copying File to Program Directory
- Index(es):
Relevant Pages
|