how to get windows service logon account

In my application i need retrieve the all services is running on the my machine and the logon account of service.

the services information i retrieved with ServiceController, but the Logon account i can't found how



Answer this question

how to get windows service logon account

  • km77

    If the question is how to retreive the account information of the user who logged on to the machine: try the Environment.User object. There's lots of info over there like the domain the user logged on to and the name of the user.

    If that wasn't the question, please clarify the real question

  • how to get windows service logon account