title: GetProcesses on local machine results in "Couldn't connect to remote machine."
body: <p>In c#, I am using the following code:</p>
  
  <pre><code>Process[] processes = Process.GetProcesses("firefox.exe");
  Console.WriteLine(processes.Length);
  </code></pre>
  
  <p>Which results in:</p>
  
  <blockquote>
    <p>InvalidOperationException: Couldn't connect to remote machine.</p>
  </blockquote>
  
  <p>Notes:</p>
  
  <ul>
  <li>OS: Windows 7, 64-bit</li>
  <li>I am <strong>not</strong> attempting to connect to a remote machine. </li>
  <li>The Remote Registry service is set to <strong>Auto</strong> and is <strong>started</strong></li>
  </ul>
  
  <p>Any thoughts as to why am I getting this error and how can I fix it?</p>