Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted

Try this one[^].
The second entry is even on codeproject (the first is yours...)!
 
Share this answer
 
Use ManagementScope get connection
and then create ManagementClass
use the file.bat as params in object[] cmdLine
and run method of InvokeMethod("Create",cmdLine);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900