开发者

Current User is LocalSystem Check?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜