Copying file to remote computer

  • Thread starter Thread starter Bhavya Shah
  • Start date Start date
B

Bhavya Shah

Hello All,
I am facing a serious problem while copying a file to a remote computer
programmatically.
What I want to do:
I want to connect to a remote computer and copy a file to the remote
computer programmatically. I have the administrator username and password of
the remote computer.
Can anyone tell me how this can be done?
I have tried using ManagementScope but it does not work.

Regards,
Bhavya Shah
 
Hi,

I think that the problem is how to connect to the remote computer, I think
that you could do that from code using "Network management API" , the
function should be NetShareAdd , but I haven't tested it.
What I did cause it was easier was using net.exe , I create a Process
instance that execute "net use" in the background with the correct
parameters and it's working great!.

I can give you the code if you want it.

Cheers,
 
Back
Top