Copy a file from local machine to remote machine using WMI
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开发者_StackOverflow中文版, but I do not want to have to set up a share on the destination machine.
Does anyone know how I could do this?
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
精彩评论