This code tells you if the user who is logged in is an administrator or not.
bool IsAnAdministrator ()
WindowsIdentity identity = WindowsIdentity.GetCurrent();
WindowsPrincipal principal = new WindowsPrincipal (identity);
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
Man throws away trove of Bitcoin worth $7.5 million