title: Killing msiexec from all users
body: <p>I have a winform app that installs msi drivers. I want the user to have a "cancel downloads" button.
  I tried many ways to do the killing in different ways and with no success.</p>
  
  <p>using:</p>
  
  <pre><code>    Process[] processesByName = Process.GetProcessesByName("msiexec.exe");
      foreach (Process process in processesByName)
      {
          process.Kill();
      }
  </code></pre>
  
  <p>It gave me "Win32Exception access is denied".</p>
  
  <p>I tried to do that from cmd, so i could use it in the code as Process.Start("cmd", "taskkill....."), but that gave me an odd answer:</p>
  
  <pre><code>C:\&gt;taskkill /IM msiexec.exe
  ERROR: The process "msiexec.exe" not found.
  </code></pre>
  
  <p>Of course, I still see it in my task manager.
  I think my problem is that the msiexec.exe is under SYSTEM user and not under my current user, but using the taskkill from a specific user gave me:</p>
  
  <pre><code>C:\&gt;TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM msiexec.exe
  INFO: No tasks running with the specified criteria.
  </code></pre>
  
  <p>Any help on how to kill all msiexec processes from all users?</p>