One of my co-workers loses focus on his current window each like 5 minutes or so. Now I'm wondering which process steals the focus
I found this cool application focus.exe which will list the current foreground window - the window which has the focus.
Whenever the focus was stolen, the program printed this information:
9524:Could not open process | Wed Oct 18 14:57:15 2017
19304:Could not open process | Wed Oct 18 14:57:15 2017
As you can see the focus gets stolen by a process that could not been opened, so this information doesn't help me that much. What helps me, is that it still logs the processes PID.
So i wrote a little PowerShell Oneliner which should catch every new process that get's created and should output the process information:
$p = ps ; while (1) { ps | ? { $_.id -notin $p.Id } ; sleep -milliseconds 1 }
But this didn't catch any of the PID's focus.exe
pointed out.
How can I catch processes that couldn't been started, but still got a PID?
focus.exe
since the source doesn't appear to be available.