Now I use this method to get all the processes:
Process[] processes = GetAllProcesses(); How can I get only those processes that are displayed on the taskbar?
As far as I can see, these processes can be obtained by filtering from your list those that have a MainWindowHandle greater than zero:
Process[] processes = System.Diagnostics.Process.GetProcesses(); var apps = processes.Where(x => x.MainWindowHandle != IntPtr.Zero); In principle, the same result can be obtained by checking Handle! = Null, but you can get an error about the absence of rights if you start from under the account without admin rights.
While launched drew attention. Outlook notifications (pop up on the taskbar) for some reason are not displayed in the task list, although they are visually visible even on the taskbar. Do you need such notifications?
ScriptedSandbox64 and ShellExperienceHost both remained and remained, but in the manager they are marked as "background". Adding them to the exceptions is not a problem, but what if the user has other garbage? - VitaliSource: https://ru.stackoverflow.com/questions/916416/
All Articles