Jump to content

Recommended Posts

Posted

Hi does anyone know of a program that will do the following

 

check for network cable connectect/enabled nic

send X number of pings to a couple of address's

return a value (0 if all ok or 1 if any of the above failed)

 

It's to be called from a another program hence the return value.

 

cheers

Posted

No not really,

I dont need to scan for IP address's , just check for enabled nic check I get a responce from a couple of address's and return sucess or fail. Its to run on XP and Win 7 would powershell do the job?

Posted
If a network cable is disconnected or a NIC is disabled then it will say it can't connect anyway, no remote tool will help unless you have redundant connections.
Posted
It's to be called from a another program hence the return value.

 

As you want another program to call it, am I to assume this is a program you have written yourself? If so, you'd be better off coding this in to your own program.

 

If this is the case, let me know what language you're using and I'll see if I can help you with the code.

  • Thanks 1
Posted
As you want another program to call it, am I to assume this is a program you have written yourself? If so, you'd be better off coding this in to your own program.

 

If this is the case, let me know what language you're using and I'll see if I can help you with the code.

 

Its being called by another program with a limited function library, I'm currently trying to write something in VB to do it but I'm bit rusty, I've just found out that I have to write a value to a file which the other program then has to read... what fun

Posted
Its being called by another program with a limited function library, I'm currently trying to write something in VB to do it but I'm bit rusty, I've just found out that I have to write a value to a file which the other program then has to read... what fun

 

Well if you're putting something together in VB.NET, then this method should help you get the info you need: Ping.Send Method (IPAddress) (System.Net.NetworkInformation)

 

That'll get you sending out pings and gathering results, but if you specifically need to check if the network is connected (obviously it is connected if the ping is successful, but it's not neccessarily disconnected if the ping fails), then look at this method: NetworkInterface.GetIsNetworkAvailable Method (System.Net.NetworkInformation)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...