Get windows users!

Zutar

Newcomer
Joined
Oct 15, 2003
Messages
8
Hi, I need to retrieve ALL windows users, whatever their group is.

I had the code in VB6,

Set myComputer = GetObject("WinNT://" & sComputerName & ",computer")
If Err.Number <> 0 Then
MsgBox ("An error has occurred." & Err.Number)
Exit Sub
End If

myComputer.Filter = Array("user")
For Each member In myComputer
List1.AddItem member.Name
Next

But in VB.net its not working, well.. there is an error with the Array Function, being a type in vb.net.

anyone have an idea how to do it?

Many thanks
 
Im not using AD, its only for a local machine. and more important.. the system.directoryservice does not exist.
 
Is directoryservices can be used to use Win2k local users?
If so, can someone post me a little example how to use it? I need to list, create and remove users from a local computer with my software. I had a working code on vb6, but I need to switch to .NET
 
Back
Top