I managed to do this by adding this class to my application: using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System.Security.Principal; namespace Gauge { public static class mySecurity { #region Constants const UInt32 TOKEN_QUERY = 8; const int INT_SIZE = 4; #endregion #region Enumerations private enum TOKEN_ELEVATION_TYPE { TokenElevationTypeDefault = 1, TokenElevationTypeFull, TokenElevationTypeLimited } public enum TOKEN_INFO_CLASS { TokenUser = 1, TokenGroups, TokenPrivileges, TokenOwner, TokenPrimaryGroup, TokenDefaultDacl, TokenSource, TokenType, TokenImpersonationLevel, TokenStatistics, TokenRestrictedSids, TokenSessionId, TokenGroupsAndPrivileges, TokenSessionReference, TokenSandBoxInert, TokenAuditPolicy, TokenOrigin, TokenElevationType, TokenLinkedToken, TokenElevation, TokenHasRestrictions, TokenAccessInformation, TokenVirtualizationAllowed, TokenVirtualizationEnabled, TokenIntegrityLevel, TokenUIAccess, TokenMandatoryPolicy, TokenLogonSid, MaxTokenInfoClass // MaxTokenInfoClass should always be the last enum } #endregion #region WIN API FUNCTIONS [DllImport("kernel32.dll")] public static extern IntPtr GetCurrentProcess(); [DllImport("advapi32.dll", SetLastError=true)] public static extern Boolean OpenProcessToken(IntPtr ProcessHandle, UInt32 DesiredAccess, out IntPtr TokenHandle); [DllImport("advapi32.dll", SetLastError=true)] public static extern Boolean GetTokenInformation(IntPtr TokenHandle, TOKEN_INFO_CLASS TokenInformationClass, IntPtr TokenInformation, int TokenInformationLength, out uint ReturnLength); #endregion #region Public Methods /// /// Returns True when the current user is a member of the /// Administrators group and is also running the process /// elevated as an Administrator, otherwise returns false. /// /// /// true if user is running the process elevated as an Administrator; otherwise, false. /// public static Boolean IsRunningAsAdmin(WindowsPrincipal pWindowsPrincipal)