[python-win32] User login details when running a service

2020-04-11 Thread Waseem Afser
Is there any possible method to get the logged in user's username from a windows service ? FYI: getpass.getuser() and other similar methods return the computer name instead of the username of the user when the script runs as a service. ___ python-win32 m

Re: [python-win32] User login details when running a service

2020-04-11 Thread Tim Roberts
On Apr 11, 2020, at 6:32 AM, Waseem Afser wrote: > > Is there any possible method to get the logged in user's username from a > windows service ? Your assumption that there is only one "logged in user” is false, which is why the information you seek is not readily available. There is a WMI q