Search code examples
language-agnosticwindows-vista

Determine the name of the local Administrators group in Vista


How can I determine the name of the local Administrators group in Vista? This can vary depending on the operating system language.


Solution

  • Look it up by the well known SID.

    In .NET you can use the enum value: System.Security.Principal.BuiltinAdministratorsSid

    In Win32 you can use the enum value: WELL_KNOWN_SID_TYPE.WinBuiltinAdministratorsSid and see MSDN for details.