title: Windows 10: How to determine whether a process is an App/Background Process/Windows Process
body: <p>Programmatically, how can I determine the 3 categories in Windows 10</p>
  
  <ul>
  <li>Apps</li>
  <li>Background process</li>
  <li>Windows service</li>
  </ul>
  
  <p>Just like Task Manager?</p>
  
  <p>i.e. I need some C# code which I can determine a list of Apps vs. a list of background process.  Checking executionState in Win32_process doesn't work.  It's always null.</p>
  
  <p>Thanks!</p>
  
  <p><a href="https://i.stack.imgur.com/wKa4U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wKa4U.png" alt="enter image description here"></a></p>