Run a .vbs script if pinged from a certain ip address RRS feed

  • Question

  • Im trying to make an easy identification system for my comptuers netowrk. I have a domain controller server and i want to make a cmd script that runs on all of my computer systems that will execute a error script which i have already made. But i need a Cmd script that will exectue the .vbs script if pinged from my server which has a static ip (Example the .vbs file is located in C:\Program Files\System Error Response\RunError.vbs

    Also can u add a line where the cmd will run hidden in the background? 

    • Edited by Kyle Inderhees Saturday, August 19, 2017 8:26 PM
    • Moved by Bill_Stewart Monday, October 2, 2017 7:08 PM This is not "do my homework for me" forumn
    Saturday, August 19, 2017 8:25 PM

All replies

  • So in my IT class we were given a task (We have the equipment) to make a domain server be able to identify a down system within the room. I had an idea that if i were to ping a computer from my server given that the servers ip is static that it would trigger an error on the main login screen on the computer pinged (All systems are static) saying something like (Error on Machine "Computer Dev 27") or something like this?

    • Merged by Bill_Stewart Sunday, August 20, 2017 7:00 PM Duplicate
    Saturday, August 19, 2017 7:19 PM
  • Sorry but we do not do homework questions for students.  This would not be helpful.  Part of your training is to teach you how to do research to solve a problem.  Asking others to provide an answer is not what is being asked of you.

    If you do not understand the lessons or what is being asked you need to talk to your instructor to get guidance and clarification.  Asking us does not help you in your class.


    Saturday, August 19, 2017 7:27 PM
  • this is a class project but I was designated as the project leader, I have created a virtual domain on my home network with a few virtual computers connected to it. I came up with the idea and my instructor said make it happen. im only 15 trying to understand this but every time i research how to make a ping request from cmd i never get anywhere
    Saturday, August 19, 2017 8:15 PM
  • Sorry but your question is too general and too vague.

    To learn how to use most system utilities do the following:

    ping /?

    You can also use your search engine to learn how to use "ping".

    Please read this first: This forum is for scripting questions rather than script requests  
    Also find scripts here: http://gallery.technet.microsoft.com


    Saturday, August 19, 2017 8:19 PM
  • Saturday, August 19, 2017 8:21 PM
  • DUPLICATE:  https://social.technet.microsoft.com/Forums/scriptcenter/en-US/ed445932-4668-4ed1-adf1-e25d07fa9437/cmd-pingexecution-script-help?forum=ITCG#09d3a94b-21ff-4f84-bf3c-d0f98ed305bf

    Please do not just keep posting the same question.  It will not get you a better answer.

    Please read forum rules at the top of the forum main page.

    What you are asking cannot be done.  There is no way to ping a computer to a script running on the remote PC.

    To test if a computer is up you can query the computer with WMI.

    Skip using VBS as it is obsolete and will not do many of the things needed.

    Look in the gallery for the many scripts that will test a remote computer.


    A moderator will merge you two questions.


    Saturday, August 19, 2017 8:34 PM
  • What if i were to use powershell? I know how to ping but is there a way i could have a powershell script boot in the backrgound of the system and wait for a signal from the Domain controller to execute a script just to make a error window pop up on the screen so we can just walk around the computers and identify the broken system. (All our computers are EXACTLY the same)
    Saturday, August 19, 2017 9:39 PM
  • I recommend that you first learn Windows technology.  Next spend time doing some tutorials for PowerShell.  So far your questions show you have very little training in Windows or how Windows actually works.

    At 15 you are at a good poi nt to learn computer technology.  I started at about 11 when their was no Internet and no one to ask.  I found the library to be a very useful place to teach myself computer technology and electronics.  Today it should be much easier with the Internet.

    We cannot solve your issue.  This is not a forum for designing custom solutions.  Start by leering the basics and move forwards.  Your instructor gave you a challenge.  It is designed to teach you how to think,  Stop worrying about steps and think about the problem.  As a project leader you need to sit down with your team and discuss ways to solve the issue.  The challenge is also to learn how to collaborate with a team

    I also recommend that you go back to the original request and try to understand it better. From you posts I think you have not really understood the problem.


    Saturday, August 19, 2017 10:02 PM
  • Ping is icmp. PowerShell Will run the Query for you but you Will have to deal with the output. Better trying a command like test-path with psdrive...

    I won't Say more, else i Will have to drive hou the script by Word. 

    Home This help!

    Saturday, August 19, 2017 11:06 PM