File Copy to Hidden Share

A

AdrianJMartin

Hi all,


I just written a app that attemps to copy a user selected file to a
bunch of users machines.

Trouble is that when call System.IO.File.Copy( src , dest , true ) i get a
Unauthorised Access Exception thrown. dest is would be something like

"\\UserMachine01\c$\localScripts\theFile.vbs"

if i actually browse using explorer to the required path the app then works,
for the machines that i've browsed to. So I CAN have persmission to copy the
file.

How do I do this in code? I obviously don't want to have the final
user(another admin) have to open up 50 explorers just to get the privledges.

I gather the 'grant' comes from me being a member of domain admins , and
domain admins being a member of local administrators on the individual
machines. And this is not negotiated automatically by a simple file copy.

Adrian
 
T

TerryFei

Hi Adrian,

We are glad to know that the problem is resolved now. Have a nice day!

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top