开发者

C# how to identify a guest account?

开发者 https://www.devze.com 2023-01-04 00:10 出处:网络
In my c# winForm application I have to recognize if a 开发者_C百科guest account is running the application.

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

精彩评论

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