You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So Process.as_dict() method sets None for any "field" it is unable to determine due to permission errors so it is very likely that if you'd use Process.username() method directly you will see the actual AccessDenied exception being raised and unfortunately there's nothing you can do about that.
Power shell is able to do that because it uses the WMI interface, which has no such (permission) limitation.
Hello,
When I use the following python code as an administrator on windows, some usernames are empty:
Notice the username of the smss.exe process (i.e. System) is empty.
If I use the following powershell code as an administrator, I see all usernames:
Why I can't see usernames (e.g SYSTEM) of some processes with psutil.process_iter() while I can with powershell for example?
Thank you in advance for your help,
The text was updated successfully, but these errors were encountered: