Hi after a bit of searching I found this sample on the newsgroup which does
what you want:
Add reference to System.DirtectoryServices
Imports System.DirectoryServices
Dim de As DirectoryEntry
Dim Child As DirectoryEntry
de = New DirectoryEntry("WinNT://" & Environment.MachineName & ",computer")
'Filter for only "User" entries.
de.Children.SchemaFilter.Add("user")
Console.WriteLine("USERS:")
For Each Child In de.Children
Console.WriteLine(" - " & Child.Name)
Next Child
Hope this helps
Greetz, Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)
"Dave" <da*******@gmail.com> schreef in bericht
news:11**********************@v46g2000cwv.googlegr oups.com...
Hi all,
My question is: How do you obtain a complete list of all the users
that are registered on the local machine? I've been trying for hours
now and can't find anything that will help on the groups.
Anyone have any idea how to do this in VB.NET?
thanks
Dave