I was kind of blank when I started off with the link you provided but with
some searching i got into a post which got Queries and i used it this way :
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
strComputer = "."
objSWbemServices =
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