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
MarcMorgan

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
UsernameIssues

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
Thread Forum
Command Line - Help
Hi Guy's and Girls, Just first off I've never been too good with CMD and only an Apprentice in my company I work for. Now something I've wanted to do for awhile was to make the following but I don't necassirealy I know how to do this in one batch file: I would need a Batch file that is...
General Discussion
ping command from guest account
when i ping yahoo or any other domain from guest account, it displays following error message C:\Users\Guest>ping yahoo.com Unable to contact IP driver. General failure.
Network & Sharing
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
Command Line
Is there a cmd.exe /switch for “run as administrator” ? Thanks-
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 17:36.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App