Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WSH and Networking

0 views
Skip to first unread message

Witness

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to
I have two computers: both are Win95; and I have the Win95 WSH installs.
Question: I want to program a WSH script that will check to see if the
other computer is available across the network, and if so, automatically
connect to the shared network drives. I know about the WshNetwork object,
but I can't figure out how to find the other computer. Can anyone help?
Witness

Alfredo Morresi

unread,
Jun 9, 1999, 3:00:00 AM6/9/99
to
If your net is an TCP/IP net, try a simple ping...

-Enjoy-
Legolas

Witness ha scritto:

Witness

unread,
Jun 9, 1999, 3:00:00 AM6/9/99
to
How do you ping using the script? (I'm pretty new to scripting.)
Alfredo Morresi <alfredo...@fratelliguzzini.com> wrote in message
news:375E1F4F...@fratelliguzzini.com...

Robert Bradley

unread,
Jun 12, 1999, 3:00:00 AM6/12/99
to
Wed, 9 Jun 1999 12:46:31 <eTQgkeps#GA.312@cpmsnbbsa05>
In microsoft.public.scripting.wsh, Witness <Comput...@email.msn.com>
posted...

>How do you ping using the script? (I'm pretty new to scripting.)

This code:

-----------------------------------------------------------------------

Function IsThere(dest)
IsThere=False

' Do one small, hidden ping

shell.Run "ping -l 1 -n 1 "+dest+" > ping-result",0,True

' Read result

Dim file
Set file=fileSystem.GetFile("ping-result").OpenAsTextStream
For i=1 To 4:line=file.ReadLine:Next
file.Close

' Delete file

Set file=fileSystem.GetFile("ping-result")
file.Delete
Set file=Nothing

If Left(line,5)="Reply" Then IsThere=True
End Function

-----------------------------------------------------------------------

--
Robert Bradley

I am not a mindreader, so I don't know everything.

Witness

unread,
Jun 18, 1999, 3:00:00 AM6/18/99
to
Thanks,
Witness
Robert Bradley <ne...@bradley-family.demon.co.uk> wrote in message
news:Wpu9ZBAr...@bradley-family.demon.co.uk...
0 new messages