How do I determine what account a service is running as from within the service itself.
+6
A:
A language would have been useful..
In C++: GetUserName
C#
System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
Adam Peck
2008-12-31 22:21:46
Strange. I could have sworn I tried that before, but this time it seems to be working perfectly.
Jonathan Allen
2009-01-01 02:37:22