| 1. |
Solve : Running ping from a batch file? |
|
Answer» First, to all who contributed to the batch file and command pages, a big THANK YOU! No programming knowledge at all here, but have made a number of batch scripts to automate things like DATA backups and disk cleanups. Everyone *says* back up your stuff frequently (the puter might not boot next time), but few do. Two clicks on a batch, and all the good stuff is copied to a flash drive in seconds. ECHO: THANK YOU! Why should we do all your thinking for you? Have you tried writing the batch script yourself? Did you even think of telling us what you have tried already? Did you not *read* the user's post? Quote from: Bat Mastersome Tried with just ping etc., and also with cmd /k for a new window. He is saying that he already tried the batch file with exactly that: ping www.example.com, which BC_Programmer later suggested. And that he also tried with cmd /k ping www.example.com. And he gave you the result: Quote from: Bat Mastersome What happens: cmd window opens, but it just keeps repeating the command infinitely, and very fast, so I have to close the window. No actual pinging.Did you not *read* that? Quote from: Salmon Trout Could you try cutting out all this Hey! Yee-har! stuff? I searched the OP, and didn't find any use of "Yee-har". So now it's Salmon Trout who's being sarcastic and snotty. Maybe he should be banned. Speaking of which: *Banned* on the first post, because you don't like his style of writing? Not even a warning or a request to phrase differently? Guess you should have an exact format posted, fill in the blanks, the way you like it, since anything else is apparently unacceptable. We banned people for spam, usually after one warning unless really bad; scamware or malware links immediately; profanity, usually after a warning unless really bad. *Never* because their style of questioning was "personally annoying". 7 billion people in the world, they're not all going to talk and write exactly alike, you know. Saw others here banned on first post because of some little nit. Someone asks you to do their homework or whatever? Point them to the rule about it, matter-of-factly, and keep them as a member for life, instead of banned for life for one mistake. Sheesh. Wikipedia has among its basic tenets: "Don't bite the newcomer". You guys sure took a GREAT chomp out of this one. Nice job of reinforcing the stereotype of computer people as being rigid, humorless geeks. Oh, and don't bother banning me - I won't come back here *ever*, I promise. And neither will my evil twin, the OP. Have a nice day. P. S. Since you guys didn't care to answer the question of why the ping command was being repeated endlessly, it was solved another way: auto-text tool (won't spam the name of it, even though it's total freeware). One click on Start, one on shortcut to cmd, one trigger letter ("p") which auto-types the desired command, (enter). Four keystrokes instead of two, and no having to deal with mini-dictators who do on the Web what they can't do in real life. Sad. Good luck. What's all this about people being "banned"? The OP has not been banned that I know of, but then I am not a moderator, just an ordinary member who gave his own personal, non-official opinion. If the OP was indeed banned, it must have been for something else that i don't know about, something more serious than a posting style that I didn't like! The OP never was and is not banned... The person who was and had his Posts removed was...maybe that's who former mod is referring to...we all know who that was... Thanks former mod on all the good advice on running a Forum. Say hi to Bill for us.Here is a great Network Connection Tester I came across. hope it helps Code: [Select]@echo off ECHO Checking connection, please wait... PING -n 1 www.google.com|find "Reply from " >NUL IF NOT ERRORLEVEL 1 goto :SUCCESS IF ERRORLEVEL 1 goto :TRYAGAIN :TRYAGAIN ECHO FAILURE! ECHO Let me try a bit more, please wait... @echo off PING -n 3 www.google.com|find "Reply from " >NUL IF NOT ERRORLEVEL 1 goto :SUCCESS2 IF ERRORLEVEL 1 goto :TRYIP :TRYIP ECHO FAILURE! ECHO Checking DNS... ECHO Lets try by IP address... @echo off ping -n 1 216.239.37.99|find "Reply from " >NUL IF NOT ERRORLEVEL 1 goto :SUCCESSDNS IF ERRORLEVEL 1 goto :TRYROUTER :TRYROUTER ECHO FAILURE! ECHO Lets try pinging the router.... ping -n 2 192.168.0.1|find "Reply from " >NUL IF NOT ERRORLEVEL 1 goto :ROUTERSUCCESS IF ERRORLEVEL 1 goto :NETDOWN :ROUTERSUCCESS ECHO It appears that you can reach the router, but internet is unreachable. goto :FAILURE :NETDOWN ECHO FAILURE! ECHO It appears that you having network issues, the router cannot be reached. goto :FAILURE :SUCCESSDNS ECHO It appears that you are having DNS issues. goto :FAILURE :SUCCESS ECHO You have an active Internet connection pause goto END :SUCCESS2 ECHO You have an active internet connection but some packet loss was detected. pause goto :END :FAILURE ECHO You do not have an active Internet connection pause goto :END :END |
|