如何使用WMI运行远程bat文件 [英] How to use WMI to run a remote bat file

查看:426
本文介绍了如何使用WMI运行远程bat文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想使用WMI运行位于远程计算机上的远程bat文件.我该怎么做.请帮助我,谢谢您.

解决方案


hi
I want to use WMI to run a remote bat file that is at remote machine. How can I do it. Please help me, thank you

解决方案

Try this one[^].
The second entry is even on codeproject (the first is yours...)!


Use ManagementScope get connection
and then create ManagementClass
use the file.bat as params in object[] cmdLine
and run method of InvokeMethod("Create",cmdLine);


这篇关于如何使用WMI运行远程bat文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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