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
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