I would like to display some extra UI elements when the process is being run as Administrator as opposed to when it isn\'t, similar to how Visual Studio 2008 displays \'Admi
using System.Security.Principal;
WindowsIdentity identity = WindowsIdentity.GetCurrent();
WindowsPrincipal principal = new WindowsPrincipal(identity);
bool isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator);