Sign in to follow this  
Followers 0
Guest mwkirk

Getting Feedback From A Ping

4 posts in this topic

Has anyone gotten anything going where they are able to get some feedback from an IP Ping? I have a pretty decent script that I use to stage various pieces of network gear. Normally, we document device names, IP addresses, etc. in a spreadsheet. I have an AutoIt script that reads the necessary information from the spreadsheet and then it can go back in the spreadsheet and update information such as MAC addresses, serial numbers and software versions. In a lot of instances the devices will have a default IP address and I have the script run through and completely configure a device. The script will then prompt me to connect the next device to be configured.

What I want it do and have had problems getting it to work just right is to go out and ping the device and make sure it is live then start chugging through configuring the next device. I have tried running a ping that outputs to a text file then have a routine that looks through that file to make sure it got a ping response but can't seem to get it working.

Anyone got a routine that does something similar that they might be willing to share?

Thanks

Mike

Share this post


Link to post
Share on other sites



i posted this script earlier that check if an ip adress responds :

; Run ping with count=1 and timeout = 1 second
$rc = RunWait(@comspec &  ' /c ping 192.168.100.100 -n 1 -w 1000','',@SW_HIDE)
If $rc = 0 Then
; host exists
Else
; host doesn't exists
EndIf

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Well I feel embarassed now. My approach was much more complicated. Nice solution to my problem. I think that is going to fit the bill perfectly.

Thanks

Mike

Share this post


Link to post
Share on other sites

i posted this script earlier that check if an ip adress responds :

; Run ping with count=1 and timeout = 1 second
$rc = RunWait(@comspec &  ' /c ping 192.168.100.100 -n 1 -w 1000','',@SW_HIDE)
If $rc = 0 Then
; host exists
Else
; host doesn't exists
EndIf
FYI: I've noticed that Windows 2000's ping command doesn't assign the expected errorlevels for successful ping attempts. What I've done in the past was to dump the ping output to a temp file, and then parsed it to determine if the ping attempt was successful.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0