4
1
I have a mapped network drive (to samba on local network) and when I try to copy a file from it to Program Files or other "secure" folders UAC pops up I confirm, and it still gives me access denied.
The workaround I'm using: I first copy the file to "unsecure" folder like Desktop and then copy it to Program Files. Still asks for UAC, but works.
Is there a way to disable this behaviour?
Edit
I'm a developer and I have specific reason to copy to Program Files. Also I don't want to turn off UAC. If you read correctly I want to disable "Access denied" message after I click yes to the UAC prompt.
Consider the circumstances:
- This happens when copying from network mapped drive
- When copying to Program files
- Copying from Desktop to Program Files works (after confirming UAC prompt)
Check this out this Microsoft KB This should be exactly what you're looking for. Also, this question should be marked as a duplicate of http://stackoverflow.com/questions/1267085/, or at least linked somehow.
– cmorse – 2011-11-01T16:10:52.823you don't have to be so hostile, a simple explanation as to why certain actions are not possible is sufficient. – Sathyajith Bhat – 2011-07-25T10:47:20.140
Sorry, but 2 answers were already telling me to turn off UAC. – Kugel – 2011-07-25T14:27:42.623
1As a fellow developer I understand your pain. I needed to resolve a similar case back when Vista and UAC first came along. My advice is that you really really reconsider writing in
Program Files
. You are basically fighting against Microsofts security intentions. I found a solution that worked, and it broke a few security updates later. So in the end I gave in and modified my application to use the recommended place to store the files I needed to muck about with.C:\Users\Default\AppData
– Nifle – 2011-07-25T14:41:39.240This is not done programmatically, I would never do that to a user PC. This is a manual thing I do when deploying a debug version of a plug-in. It was just annoying hence the question. – Kugel – 2011-07-25T16:27:50.847