Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Command Line PING response

22 Jun 2012   #1

Windows 7 x64bit
Command Line PING response

Hi All

Im not sure where to post this so i do apologise if this is in the wrong field:

I work within the IT department and i require to install some software etc on machines remotely on our network, the machines tend to be offline due to been portable computers so i wanted to see if there was a way to create a script or something so if did a ping response from command line (ping machine name -t) so that when the machines did actaully appear back on the network i would receive say an email from Microsoft Outlook (exchange)

This would be weather the command line has to stay open (which i know i could do with the Asstrix syntax but i dont want to keep it open, just have something to notify me when its back on our network

My System SpecsSystem Spec
22 Jun 2012   #2

W7 Pro SP1 64bit

Welcome to the Seven Forums!

You can probably locate a software tool that will do this for you, but since you work in IT, you should learn to write these tools yourself. Adding that skill set to your repertoire could really help you in the IT realm.

There are several scripting languages that can be used to send an e-mail when a computer comes online - or better yet, automate the remote installation and let your script do the remote install once a user brings the computer(s) of interest online. The script can also let the user postpone the install if need be.

AutoIt - AutoItScript
AutoIt is a scripting language originally created to automate the installation of software. I've used it to remotely install software on dozens of computers. It has a ping feature that I use every day to reset my cell phone tether software if the ping times get too bad.

The AutoIt developers had some disagreements and AutoHotKey was born. Both scripting tools will do what you want - or pick another scripting tool.

If you decide to dive into this area, I would suggest AutoIt and this book:
Windows Admin Scripting Little Black Book, 2nd Edition*-*O'Reilly Media

If you want to see what AutoIt looks like in action - see the video in this post. The problem that the script is attempting to solve = the user's computer had some issue that made explorer crash and when it did, he had to manually end MagicDisc and manually restart MagicDisc in order to get the tray icon back. In the video, you'll see me manually kill explorer to simulate explorer crashing.

The script "sees" that the explorer process has ended
it then restarts explorer
kills MagicDisc
restarts MagicDisc
The kill/restart of MagicDisc is so fast that you never see it leave the list of programs in Task Manager - but you can see that MagicDics is running under a new process ID - so, it did indeed restart.

I'm not a pro at scripting - so there is definitely room for improvement in the code shown in that post.

Combine most any scripting tool what a command line e-mail program like Blat (happy mailing : Blat online) and you have the tool that you asked for. There are probably newer tools than Blat, but I've had no reason to go hunting for another such tool.

In other words, the scripting software does the pinging and when it "sees" that a computer is online, it calls BLAT to send you an e-mail. All of this can be done without any windows showing up on your desktop - or you might add a balloon in the notification area.
My System SpecsSystem Spec

 Command Line PING response

Thread Tools

Similar help and support threads
Thread Forum
Delay between command and response
Suddenly this computer has developed a delay between command and response. This applies to: - typing (delay before letters show) - clicking(delay before click activates) - any ordinary operations ... opening pages, playing videos, closing browser etc. This is a recent development and there is...
General Discussion
Executing command line command anywhere ?
I want to create a setup whereas a command line command can be run from any directory/folder, without having to be in the directory/folder whereas the command line command resides ?
General Discussion
Disabling Ping Response or even stealth it
Hello again, I was reading under the Commodo FireWall Thread of a site to test your online security. Gibson Research tested my machine and all passed except IIRC the Ping was responding. I have looked in Commodo and have been unable to find out how to stealth or just disable the Ping requests....
Network & Sharing
Ping Response From Windows 7
Hi Everybody My wired home network has4 PC's - one running Windows 7 Professional 64 bit and the other running Windows XP SP 3 32 bit O/S. When I use the Ping command on any of the PC's running XP, the response is in the form as below from a PC which is offline :- Pinging 192.168.X.XXX...
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 13:36.
Twitter Facebook Google+