Задайте вопросЗадайте вопрос
 

ОтвеченоRetrieving windows user accounts

Ответы

  • 23 марта 2006 г. 4:31James KovacsMVPМедали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     Отвечено
    You can use the System.DirectoryServices.DirectoryEntry class to retrieve information on local users, groups, and services:

                using(DirectoryEntry root = new DirectoryEntry("WinNT://EDDINGS")) {
                    foreach(DirectoryEntry child in root.Children) {
                        if(child.SchemaClassName == "User") {
                            Console.WriteLine(child.Name);
                        }
                    }
                }

    SchemaClassName can also be Group or Service.

Все ответы