public bool IsAdministrator(){WindowsIdentity current = WindowsIdentity.GetCurrent();WindowsPrincipal windowsPrincipal = new WindowsPrincipal(current);return windowsPrincipal.IsInRole(WindowsBuiltInRole.Administrator);}
转载声明:本文转载至
本文共 234 字,大约阅读时间需要 1 分钟。
public bool IsAdministrator(){WindowsIdentity current = WindowsIdentity.GetCurrent();WindowsPrincipal windowsPrincipal = new WindowsPrincipal(current);return windowsPrincipal.IsInRole(WindowsBuiltInRole.Administrator);}
转载声明:本文转载至