开发者

Current User is LocalSystem Check?

开发者 https://www.devze.com 2023-03-27 03:45 出处:网络
It is easy enough to determine if the user running my C# .NET 4.0 console app is a member of the local Administrators group. I am also trying to determine if it is running under LocalSystem开发者_运维

It is easy enough to determine if the user running my C# .NET 4.0 console app is a member of the local Administrators group. I am also trying to determine if it is running under LocalSystem开发者_运维技巧. What is the best way to do that?


WindowsIdentity.GetCurrent().User.IsWellKnown(WellKnownSidType.LocalSystemSid)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号