I searched high and low and have found some discussions on this topic but do seem to see any solutions. So here is my issue. I have an application that will copy 2 files to the Program Files directory. What happen is, when I run it and the files exist (this should be what normally happens) I get accessed denied. If I try to do a File.Delete (in code) first I get an access denied, however I can manually (in OS windows explorer) delete the files and then the copy will work. I am running the application as Admin, so permissions to the folder are good.
The application is restoring a 3rd party software file that tends to get corrupted a lot. We have mechanism that will back this file up, but when I try to restore it I get the problem described above. (not a file lock issue, I have made sure no programs have a handle to the file)
OS = Vista32
Program written in C#
Is there anyway of accomplishing this?
View Complete Post