title: Win32Exception while in Adminstrator mode
body: <p>Im getting this error while Visual Studio is in Administrator mode</p>
  
  <pre><code>System.ComponentModel.Win32Exception
    HResult=0x80004005
    Message=Access is denied
    Source=System
    StackTrace:
     at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
     at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
     at System.Diagnostics.Process.GetProcessTimes()
     at System.Diagnostics.Process.get_StartTime()
     at TaskManager.Program.Main(String[] args) in C:\Users\User\source\repos\TaskManager\TaskManager\Program.cs:line 18
  </code></pre>
  
  <p>Im just trying to show total time run of a process. Here is the main code</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Diagnostics;
  
  namespace TaskManager
  {
      class Program
      {
          static void Main(string[] args)
          {
              Process[] processList = Process.GetProcesses();
              foreach(Process process in processList)
              {
                  DateTime localDate = DateTime.Now;
                  Console.WriteLine(@" {0} | ID: {1} | Status {2} | Memory {3} MB | Total Run Time {4}", process.ProcessName, process.Id, process.Responding, process.PrivateMemorySize64 / 1000000, localDate - process.StartTime);
              }
              Console.ReadLine();
          }
      }
  }
  </code></pre>
  
  <p>Thanks</p>