Ist aktueller User Admin ??? [C#]
-
Hallo Leute,
nachdem ich mir schon ne Weile die .NET-Doku reinziehe, hab ich immer noch nicht rausgefunden, wie ich feststellen kann, ob der aktuell angemeldete User über Administratorenrechte verfügt.
Ich hoffe, es hat jemand einen guten Tip oder so. Danke !
-
warst du schon auf codepoject.com?
-
System.Security.Principal.WindowsPrincipal wp = new System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent()); bool isAdmin = wp.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator);
-
danke, das hätt ich nie gefunden !!!!