2

I know there are a few "possible duplicate" questions but they don't have a proper answer. I've looked over the whole internet and I can't find a way to get only the processes that are in the "apps" section of the Task Manager (or the ones that are displayed as running on the windows taskbar, same thing) If the Task Manager can do it, then it can be done.

Also how would I go about getting only the process that the user is currently on? (the currently opened process, same thing) For example right know my currently opened process is chrome. If I go to play Minecraft, it will change to minecraft... you get the idea.

Please stop marking this as a duplicate and take some time to read my question.

JingleBells
  • 187
  • 9
  • Does this answer your question? [Getting a list of all applications](https://stackoverflow.com/questions/14207487/getting-a-list-of-all-applications) – Manish Dec 23 '19 at 07:09
  • No, I have seen it before. As the author says on all answers, it still displays some mix of processes but not ONLY the ones from the "apps" section of the Task Manager. – JingleBells Dec 23 '19 at 07:12
  • try this -> https://social.msdn.microsoft.com/Forums/vstudio/en-US/60affc28-364a-4a8a-8f03-ec976918c2ca/c-how-to-get-applications-like-in-the-taskmanagers-tabs-?forum=csharpgeneral – Manish Dec 23 '19 at 07:22
  • I tried it. It does what I want but there are still a few processes (such as Calculator, Settings and Microsoft Store) that I don't want there but I guess I'll remove them manually. – JingleBells Dec 23 '19 at 07:30
  • 1
    Be aware that Task Manager uses *heuristics*, not some form of API to decide what to show where. A key aspect to realise about that is, even if you match what Task Manager does *today*, you've got no guarantee of what it'll do when the next windows upgrade hits. There's no contract. – Damien_The_Unbeliever Dec 23 '19 at 08:25
  • 1
    Thanks, but that doesn't help. Should I consider it impossible? – JingleBells Dec 23 '19 at 09:40
  • Based on my search, I can not find a direct way to get apps name from the taskmanager. However, I suggest that you can get process first. Then, you can use Process.MainWindowTitle to know the appname – Jack J Jun Dec 24 '19 at 05:47

0 Answers0