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.

AutoHotkey
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
Reply

 Command Line PING response




Thread Tools



Similar help and support threads for2: Command Line PING response
Thread Forum
Disabling Ping Response or even stealth it Network & Sharing
UAC bug with runas from command line? General Discussion
How can I set this via command-line or registry? Customization
Gpedit via command line Performance & Maintenance
Ping Response From Windows 7 Network & Sharing
Command Line General Discussion

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 12:38 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33