batch file idea help

Discussion in 'Computing and Networks' started by electronis whiz, Feb 14, 2012.

  1. electronis whiz

    Thread Starter Well-Known Member

    Jul 29, 2010
    I came up with an idea the other day. Because I know somebody that just knows enough about computers to be dangerous. sometimes they have a internet or related problem (at least they think because of some network program for the modem has different color lights on the message pane of the windows taskbar. and sometimes i may bring up a ping just to verify. and it is usually ok. I was thinking it would be nice to make a batch file and put it on the desktop. then if they think theirs an issue they can just click the file and see the output and close it. I could probably do this pretty easily. However I would thought maybe there was a way it could bring up some dialog box with a message such as [test connection to] then have a combo box where they could select or enter the site or ip to ping. Then pass that variable back to the batch file where it would run then either shows a message in the shell or in another dialog box of the results. I’m wondering 1. Is this even possible or would this be like some java or other programming language? 2. Is it is how do I go about making the it display the message then accept a value in then run it?
  2. magnet18

    Senior Member

    Dec 22, 2010
    Code ( (Unknown Language)):
    3. set PING=
    4. set /P PING=ping destination (ip address or web address; ex. or %=%
    5. Ping %PING%
    6. pause
    like this?
    (and whatever you do, DONT save it as ping.bat, save it as autoping.bat or something)
  3. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    Dialog boxes in a batch file would require programming in a language such as Java, VB, etc... However, you could set a default host, prompt for a test host name (and use the default if nothing was entered, perform the ping and pause until the user responds. You could even test to see if the ping was successful.

    Look for the batch commands and their options: echo, set, if, pause...
  4. bertus


    Apr 5, 2008
  5. electronis whiz

    Thread Starter Well-Known Member

    Jul 29, 2010
    ok thanks that is kind of what i thought. sorry for the slow responce hvent had a chance to get on here.