C # how to define a guest account?

In my C # winForm application, I need to find out if the guest account is running. Any idea?

+5
source share
1 answer

You can check the IsGuestcurrent property WindowsIdentity:

if (System.Security.Principal.WindowsIdentity.GetCurrent().IsGuest)
{
    // it a guest account
}
+10
source

All Articles