Is there a canonical way to test to see if the process has administrative privileges on a machine?
I\'m going to be starting a long running process, and much later
Using the .NET Framework 4.5, it seems to be easier to check if a user is in the administrators group:
WindowsPrincipal principal = WindowsPrincipal.Current; bool canBeAdmin = principal.Claims.Any((c) => c.Value == "S-1-5-32-544");