1

I have been searching for about 2 hours now without any luck, maybe I am searching for the wrong things... But, Here's what I need:

When you go to "Computer" in the Start Menu of Windows (Vista and 7), and you then click on "Network" on the left hand side, you see a couple of devices. I need to get the computers from that list of devices in .NET (C# or VB, doesn't matter.). Specifically, I need thier ADDRESS, like \\HOME-PC and so forth.

I have no clue on how to do this. I have looked through the object browser, and on Google, but no luck.

svick
  • 236,525
  • 50
  • 385
  • 514
René Sackers
  • 2,395
  • 4
  • 24
  • 43
  • 1
    In searching Stackoverflow I found this http://stackoverflow.com/questions/5581140/in-c-how-do-i-get-the-list-of-local-computer-names-like-what-one-gets-viewing-th – Mark Hall Aug 07 '11 at 16:05
  • Awesome, next time, you should post it as an answer :D Can't really give you credit this way. – René Sackers Aug 07 '11 at 16:26

2 Answers2

2

I think what you're trying to do is query the WorkGroup for other computers, to do so you could use the code mentioned here

Community
  • 1
  • 1
sternr
  • 6,216
  • 9
  • 39
  • 63
  • Ah, ofcourse! Workgroup! I should've thought about that! Thank you, this resolves my problem! It will still only get something like "HOME-PC" instead of "\\HOME-PC", but I guess if the names are correct, I can just add "\\" infront of it. Thanks! – René Sackers Aug 07 '11 at 16:23
-1

see Retreiving a list of network computer names, i guess it is what you are looking for

Haris Hasan
  • 29,856
  • 10
  • 92
  • 122
  • Also a great answer, thank you for trying to help. Check out sternr's answer, it seems a lot simpler, and possably more reliable :) – René Sackers Aug 07 '11 at 16:24