1

I've tried figuring out how to copy a file from the local machine my program is running on onto a remote machine using C# and WMI (Without having to set up a share on the remote machine), but with no luck.

The source file could be on the local computer the program is running from or on share, but I do not want to have to set up a share on the destination machine.

Does anyone know how I could do this?

Avilan
  • 161
  • 1
  • 4
  • 10

1 Answers1

1

I bashed my head on this until I found Frank White's WMI method of using CMD to create a way of doing this. As long as your account can access a shared folder (UNC, FTP, http, etc.) the workaround works: https://stackoverflow.com/a/11948096/1569434

Community
  • 1
  • 1
Lizz
  • 1,442
  • 5
  • 25
  • 51