batch file idea help

Thread Starter

electronis whiz

Joined Jul 29, 2010
512
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?
 

magnet18

Joined Dec 22, 2010
1,227
Rich (BB code):
set PING=
set /P PING=ping destination (ip address or web address; ex. 127.0.0.1 or google.com): %=%
Ping %PING%
pause
like this?
(and whatever you do, DONT save it as ping.bat, save it as autoping.bat or something)
 

djsfantasi

Joined Apr 11, 2010
9,163
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...
 
Top