Enum local user accounts

  • Thread starter Thread starter Mircea Pleteriu
  • Start date Start date
M

Mircea Pleteriu

Hi

Is it possible to enumerate the local user accounts by means of classes in System.DirectoryServices namespace?
My OS is Windows XP Professional.

Thanks,
Mircea
 
Hi Peter,

I need a way to list the built-in local user accounts.

I am able to list the following types of user accounts: domain user
accounts, built-in domain user accounts, local user accounts.
But I am not able to list the built-in local user accounts.

It works with WMI but I have to accomplish that with Active Directory.
 
Local accounts are not domain accounts, as such they are not registered in
the AD and you can't use LDAP as provider.
You can use the DirectoryServices namespace classes with the "WinNT"
provider to access the local SAM.
Check:
.... DirectoryEntry("WinNT://....
in MSDN.

Willy.
 
Back
Top