Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Retrieving all the machines in my network!

Retrieving all the machines in my network!

Scheduled Pinned Locked Moved .NET (Core and Framework)
sysadminquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hercules01
    wrote on last edited by
    #1

    hi, can anyone please give me a hint of how can i retrieve all the Machines name and IPs in my network whether its a workgroub or domain. thanks in advance.

    H S 2 Replies Last reply
    0
    • H Hercules01

      hi, can anyone please give me a hint of how can i retrieve all the Machines name and IPs in my network whether its a workgroub or domain. thanks in advance.

      H Offline
      H Offline
      Hadi Fakhreddine
      wrote on last edited by
      #2

      Hey! I had the same problem, i found this app here http://thecodeproject.com/vb/net/MyLanApp.asp just read the source

      H 1 Reply Last reply
      0
      • H Hadi Fakhreddine

        Hey! I had the same problem, i found this app here http://thecodeproject.com/vb/net/MyLanApp.asp just read the source

        H Offline
        H Offline
        Hercules01
        wrote on last edited by
        #3

        thanks that was really helpfull, but i think that this method only works when there is an Active Directory installed, is this right? so i need a generic way to retrieve the machines in the network even if it was a workgroup!!!

        H 1 Reply Last reply
        0
        • H Hercules01

          thanks that was really helpfull, but i think that this method only works when there is an Active Directory installed, is this right? so i need a generic way to retrieve the machines in the network even if it was a workgroup!!!

          H Offline
          H Offline
          Hadi Fakhreddine
          wrote on last edited by
          #4

          Basically what you'll need to do is use the DOS utility "net view". When you type it in the command prompt, it lists all computers on the network whether Active Directory is on or off. All you'll have to do in your app is to call the Shell using "net view" as a command and adding ">C:\myfile.txt" (this is the location where all the net view info will be stored). Just read the file from your app and parse the string to get the list. I've already seen several VB6 apps doing this and have tried it myself on WinXP and it works fine. Check out NetSend (VB6) here http://www.a1vbcode.com/download.asp?ID=2503 it does exactly what you need :cool:;)

          H 1 Reply Last reply
          0
          • H Hadi Fakhreddine

            Basically what you'll need to do is use the DOS utility "net view". When you type it in the command prompt, it lists all computers on the network whether Active Directory is on or off. All you'll have to do in your app is to call the Shell using "net view" as a command and adding ">C:\myfile.txt" (this is the location where all the net view info will be stored). Just read the file from your app and parse the string to get the list. I've already seen several VB6 apps doing this and have tried it myself on WinXP and it works fine. Check out NetSend (VB6) here http://www.a1vbcode.com/download.asp?ID=2503 it does exactly what you need :cool:;)

            H Offline
            H Offline
            Hercules01
            wrote on last edited by
            #5

            Thanks for your help this is exactly what i wanted.

            1 Reply Last reply
            0
            • H Hercules01

              hi, can anyone please give me a hint of how can i retrieve all the Machines name and IPs in my network whether its a workgroub or domain. thanks in advance.

              S Offline
              S Offline
              Sancy
              wrote on last edited by
              #6

              here's a command: net view It will write to the standard output so i guess there will be no problem there :) Or there is another method, using NetBios, for that try google:P And it fades like the shadow in the night. PhoeniX

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups