I’m using an internet connection which goes down after some time. If I repair my connection it works fine. I have to do it always manually. I want to do this task automatically.
I.e. I want to create a windows batch file which is constantly running in the background. When my internet connection is down, it will renew and restart the connection again without any interaction
I want to do this task using a windows batch file. I tried this:
runas /user:local\administrator
ipconfig /release
ipconfig /flushdns
ipconfig /renew
However, I don’t know how to detect whether Network connection is down or up?
I’m hoping for quick and positive response.
You could try and ping a widely used service in your country (or ping google like crazy) to detect internet connectivity. it’s not bullet proof, but will let you know when your internet is down (probably).
The result of pinging could be checked by batch/script and according to the result, decide whether you want to
ipconfig /renewor not.