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
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