Jump to content
Sign in to follow this  
Guest Quic&Painles

Ping -a

Recommended Posts

Guest Quic&Painles

I am trying to put together a simple script that pings a machine and tells you if the machine is up or down, it also gives you the IP of the machine if you use the machines name the part I am having problems with is if you use the machines IP I want it to tell you the machines name (just like Ping -a would).

Im sure it is something I am just over looking but i have had no luck. Ive tried

$objnet = ObjCreate("WScript.Network","IP here")



#include <Constants.au3>

Dim $log, $output

$log=Run ( @ComSpec & ' /c ping -a IP here, '', @SW_HIDE, $STDOUT_CHILD )

$line = StdoutRead($log,25)

$output = $output & @CR & $line

MsgBox (0, 'Ping', $output)

Among other things and can not seem to get anywhere, I have also attached what I have pieced together so far.


Thanks for any help.

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.