how to check internet connection through a batch file and trigger a acrion if connection is found?
|
05-19-2014, 10:36 PM
Post: #1
|
|||
|
|||
how to check internet connection through a batch file and trigger a acrion if connection is found?
how to check internet connection through commands of command prompt whenever computer is started ?
if internet connection is available then i want trigger a action i.e. i want run another command if internet connection is not available then again check of connection should be made after few minutes i want all this to happen in BACKGROUND through a batch file Ads |
|||
05-19-2014, 10:43 PM
Post: #2
|
|||
|
|||
ping internic.net, if you get a reply then you are on the internet
Ads |
|||
05-19-2014, 10:52 PM
Post: #3
|
|||
|
|||
Batch won't really run "in the background". It always has a console window. You can set up a shortcut to your batch file that starts minimized, but it will show up on your task bar.
But, like the other answer said, ping a known domain name with something like: ping -n 2 google.com >nul if errorlevel 1 goto NO_INTERNET That will fail, though, if your ISP or some firewall or gateway along the way discards ICMP packets. Where I work, no pings or tracerts make it out of the local network. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)