How to determine the pcs on the LAN

G

greatmacoy

I need a code to identify the name and ip addresses of the
computers on the LAN. I will use the code in a MS Access
Module. I need to identify which computers belong to the
workgroup in which the local computer also belongs to. I
should be able to determine their computer names and ip
addresses.

please help me.
 
A

Alex Ivanov

The simpliest solution that may work for you (not the best one)
shell "net view >tmpfile.txt"
'wait a second loop here
open "tmpfile.txt" for input as #1
while not eof(1)
'parse the file line by line
wend

Other options include using Windows API or WMI, but I don't have any readily
available samples.
Search Google and you should find some links, ie

http://support.microsoft.com/?kbid=194115 it's related to domains, but might
work with workgroups also
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=15174&lngWId=1
should list both.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top