Well, I'm trying to run "notepad" (for example) on a remote computer, here is my code:
object[] theProcessToRun = { "notepad.exe" };
ConnectionOptions theConnection = new ConnectionOptions();
theConnection.Username = "My UserName";
theConnection.Password = "My Password";
ManagementScope theScope = new ManagementScope("\\\\" + ipAddress + "\\root\\cimv2", theConnection);
ManagementClass theClass = new ManagementClass(theScope, new ManagementPath("Win32_Process"), new ObjectGetOptions());
theClass.InvokeMethod("Create", theProcessToRun);
(I'm able to connect to the remote computer). Nothing happens - the program exits correctly, but nothing is being run on the remote.
Any ideas?
Thanks!