Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing to Program Files folders

Status
Not open for further replies.

sacsac

Programmer
Dec 10, 2000
182
GB
I am writing an application where I need to copy some data files into the user's application folder, which is located in ProgramFiles. I know that data should not be stored here, but this is a third party application and that is where they have put them! I am just adding some extra functionality and need to update these files. When I try to copy files into this location the system naturally protests. Is there any way to force acceptance of copying into ProgramFiles?
 

What doi you mean by "the system naturally protests"? Do you get an error? If so, what's the error?

"copying into ProgramFiles" - any sample of code of what you are doing?

What's the Operating Sysytem that you are using?

Have fun.

---- Andy
 

Thanks Andrzejek.

When I said that the system protests I was being lazy! I actually get error message #5 "Access to the path [filename] is denied". I am using Filecopy(Source, Destination).
I am developing with VB2010 on Windows7, but the application is running on all OSs from XP upwards. I am assuming that this is something to do with UAC and/or elevated permissions(?), but I have no idea how to circumvent these rerstrictions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top