I would like to know if it's possible to list all the GUI apps running on Windows with python.
I've been doing some research and people recommend using psutil
, and it seems okay, however, it lists all the active processes, I haven't been able to find any resource on how to keep only the processes that are associated to an active GUI app (for example, Firefox, Chrome, Skype, Discord, and so on).
Is there any way to do this? Maybe not with Python (although that would be amazing), maybe through some C++? Getting the PID of the process would be enough.
EDIT: Thanks to chrisbyte and Vijaye Raji, win32gui
and EnumWindows
is exactly what I was looking for.