问题
How do I determine what account a service is running as from within the service itself.
回答1:
A language would have been useful..
In C++: GetUserName
C#
System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
来源:https://stackoverflow.com/questions/404144/what-account-is-my-service-running-as