Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var connection = new ConnectionOptions();
- connection.Username = @"xxxx";
- connection.Password = "xxxxx";
- ManagementScope WMIscope = new ManagementScope(
- string.Format("\\{0}\root\cimv2", REMOTE_COMPUTER_NAME), connection);
- WMIscope.Connect();
- ManagementClass WMIprocess = new ManagementClass(
- WMIscope, new ManagementPath("Win32_Process"), new ObjectGetOptions());
- object[] process = { "cmd.exe" };
- object result = WMIprocess.InvokeMethod("Create", process);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement