public static TokenHandle Create( TokenAccess access, TokenType tokenType, Sid user, Sid[] groups, PrivilegeSet privileges ) { using (var administratorsSid = Sid.GetWellKnownSid(WellKnownSidType.WinBuiltinAdministratorsSid)) using (var thandle = TokenHandle.OpenCurrentPrimary(TokenAccess.Query)) return(Create(access, 0, thandle, tokenType, user, groups, privileges, administratorsSid, administratorsSid)); }