|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Obtaining complete User ListHi 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 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 -- Show quoteHide quoteProgramming 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" <davesa***@gmail.com> schreef in bericht news:1140774269.512499.188830@v46g2000cwv.googlegroups.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 >
object reference not set to an instance???
possible to create one control array with different controls? vb2005 propertybag After export to Excel, that excel cannot open Late binding equivalent Can you emulate an ActiveX exe in .NET "The path is not of a legal form" error - WinFoms designer dealing with images of varing sizes on a form. Field token out of range (System.BadImageFormatException) VB 'Phone Home' |
|||||||||||||||||||||||