开发者

C# how to identify a guest account?

In my c# winForm application I have to recognize if a 开发者_C百科guest account is running the application. Any idea?


You can check the IsGuest property of the current WindowsIdentity:

if (System.Security.Principal.WindowsIdentity.GetCurrent().IsGuest)
{
    // it's a guest account
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜