visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: ASP :: VBS :: Browse the computer name on LAN


By: VB guy Canada  Date: 25/02/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
I'm looking for VB Script code to browse the network neighborhood and return the All of computer name online on the Local Area Network.


By: VGR Date: 25/02/2003 20:35:00 English  Type : Answer
use WinNet API
By: adersoft Date: 25/02/2003 21:13:00 English  Type : Comment
Try this simple code:

Have you tried VbsEdit to edit .vbs files ?
You can downlaod it from <A HREF="http://www.adersoft.com/vbsedit">http://www.adersoft.com/vbsedit</a>

Dim WshShell
Set WshShell = CreateObject("wscript.shell")
WshShell.Run "cmd /c net view > c:\neighborhood.txt",1,True

Dim fso
Set fso = CreateObject("scripting.filesystemobject")

Dim file
Set file = fso.OpenTextFile("c:\neighborhood.txt",1)
Do While Not(file.AtEndOfStream)
Dim computername
computername = file.ReadLine
If Left(computername,2)="\\" Then
Dim pos
pos = InStr(computername," ")
wscript.Echo Left(computername,pos-1)
End If
Loop
file.Close
By: VGR Date: 25/02/2003 21:23:00 English  Type : Comment
do you mean that you have a c:\neighborhood.txt file maintained by ZinDoze containing the computers in the neighborhood ?!!!??

Personally (Win2K) I don't :D
By: adersoft Date: 25/02/2003 21:57:00 English  Type : Comment
Have a look at the third line:

WshShell.Run "cmd /c net view > c:\neighborhood.txt",1,True

By: VGR Date: 25/02/2003 22:13:00 English  Type : Comment
sorry
good idea then

Do register to be able to answer

EContact
browser fav
page generated in 439.825770 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page