开发者

Copy a file from local machine to remote machine using WMI

开发者 https://www.devze.com 2023-03-11 07:09 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消