views:

91

answers:

1

In my c# winForm application I have to recognize if a guest account is running the application. Any idea?

+8  A: 

You can check the IsGuest property of the current WindowsIdentity:

if (System.Security.Principal.WindowsIdentity.GetCurrent().IsGuest)
{
    // it's a guest account
}
Fredrik Mörk