LordNewton Posted May 20, 2013 Posted May 20, 2013 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
cobra427col Posted May 20, 2013 Posted May 20, 2013 Is AngryIP what you are looking for - I use a really old version but it does for me..
LordNewton Posted May 20, 2013 Author Posted May 20, 2013 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?
CAM Posted May 20, 2013 Posted May 20, 2013 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.
edutech4schools Posted May 20, 2013 Posted May 20, 2013 create a bat file that pings the ip address you need checked.
LosOjos Posted May 20, 2013 Posted May 20, 2013 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. 1
LordNewton Posted May 21, 2013 Author Posted May 21, 2013 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
LosOjos Posted May 21, 2013 Posted May 21, 2013 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)
LordNewton Posted May 21, 2013 Author Posted May 21, 2013 Cheers, your got me in the right direction!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now