Tell me more ×  I'm writing a tool which connects to a remote
computer and runs something there. I'm using WMI, and here's my
code:  object[] theProcessToRun = { "notepad.exe" };
ConnectionOptions theConnection = new ConnectionOptions();
theConnection.Username = "username"; theConnection.Password =
"password"; ManagementScope theScope = new
ManagementScope("\\\\" + myIP + "\\root\\cimv2", theConnection);
ManagementClass theClass = new ManagementClass(theScope, new
ManagementPath("Win32_Process"), new ObjectGetOptions());
theClass.InvokeMethod("Create", theProcessToRun);  I get an
exception on the: theClass.InvokeMethod("Create",
theProcessToRun); line. Here's the exception:   I checked the
RPC service both on my machine, and the remote, they are both
started. I also tried disabling the firewall and the UAC,
nothing happens, it still crashes.  Any ideas?   share|improve
this question ok, solved! Had to add a rule to enable wmi in the
remote firewall. –  Idanis Jan 13 at 10:49 add comment   Your
Ans