Checking Remote Computer Availability - Codoid
Select Page
Codoid Blog

Checking Remote Computer Availability

Irrespective of the business that your client is in, marketing is an integral part of their operations. In fact, in this day and age of social.

There might be a case where we have to connect to remote
computer. In such case, before connecting to the remote computer, How to confirm remote computer is available or not?

Code

Dim oNetwork

'Creating Visual Basic Network object
Set oNetwork=DotNetFactory.CreateInstance("Microsoft.VisualBasic.Devices.Network"
,"Microsoft.VisualBasic")

'Ping method returns True, if remote computer is available.
If oNetwork.Ping("192.01.01.01") Then
Msgbox "Available"
Else
Msgbox "Not Available"
End If

Set oNetwork=Nothing
  

Synopsis

We can also ping with URL or computer name.

Written By

Submit a Comment

Your email address will not be published. Required fields are marked *


There might be a case where we have to connect to remote
computer. In such case, before connecting to the remote computer, How to confirm remote computer is available or not?

Code

Dim oNetwork

'Creating Visual Basic Network object
Set oNetwork=DotNetFactory.CreateInstance("Microsoft.VisualBasic.Devices.Network"
,"Microsoft.VisualBasic")

'Ping method returns True, if remote computer is available.
If oNetwork.Ping("192.01.01.01") Then
Msgbox "Available"
Else
Msgbox "Not Available"
End If

Set oNetwork=Nothing
  

Synopsis

We can also ping with URL or computer name.