Hi, try the code:
Function ComputerList() As String()
Dim p As New Process
Dim sysFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.System)
p.StartInfo.FileName = System.IO.Path.Combine(sysFolder, "net.exe")
p.StartInfo.Arguments = "view"
p.StartInfo.UseShellExecute = False
p.StartInfo.RedirectStandardOutput = True
p.Start()
Dim result As String = p.StandardOutput.ReadToEnd
p.WaitForExit()
Dim mList As New List(Of String)
For Each line As String In result.Split(vbLf)
If line.Length > 2 AndAlso line.Substring(0, 2) = "\\" Then
mList.Add(line.Split(" ")(0).Replace("\\", String.Empty))
End If
Next
Return mList.ToArray
End Function