.NET-通过LAN将可执行文件复制到另一台计算机并执行 [英] .NET - Copying an executable across LAN to another computer, and executing it

查看:72
本文介绍了.NET-通过LAN将可执行文件复制到另一台计算机并执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用.NET,然后疯狂地试图找到任何有用的API,使我可以通过LAN网络传输文件(当然是通过管理员凭据),然后在该计算机上执行该文件。

I'm using .NET, and going crazy trying to find any helpful API that lets me transfer a file across a LAN network (trough admin credentials of course) and then execute it on that machine.

我已经用WMI读过一些东西,但是搜索 .net WMI复制文件或 .net WMI执行文件根本没有帮助。

I've read some thing using WMI, but googling for ".net WMI copy files" or ".net WMI execute files" isn't helping me at all.

任何引用将不胜感激。

编辑

我不能使用第三方工具(例如PsExec)(尽管它完全可以满足我的需要)。这是由于PsExec涉及的许可证,我无法随我的应用程序一起分发它。

I can't use a third party tool such as PsExec (although it does perfectly what I need). This is because of the license involved with PsExec I cannot distribute it with my application.

推荐答案

我不认为这是轻松实现。但是,您可以使用.net复制该exe。然后(也从.net使用 Process.Start )调用 psExec 并使其远程执行程序。

I don't think that this is easily achieved. You can however copy the exe with .net. And then (also from .net, with Process.Start) invoke psExec and make it execute the program remotely.

这篇关于.NET-通过LAN将可执行文件复制到另一台计算机并执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆