Question

How do I determine what account a service is running as from within the service itself.

Was it helpful?

Solution

A language would have been useful..

In C++: GetUserName

C#

System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top