Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any free software that will detect the status of internet and shutdown the system when the internet disconnects?

Or (more generally) can something run a task when the internet disconnects, and I can route it to shutdown the machine?

I am downloading things overnight. But my problem is that sometimes the internet connection will be disconnected in the middle of the night, so there is no point in keeping the system running the rest of the night.

So I need to avoid this problem by detecting the net connectivity.

share|improve this question

migrated from Dec 22 '09 at 18:29

This question came from our site for professional and enthusiast programmers.

You can make an executable of your own, where you can ping some popular websites and see if you are receiving response. If not you can shutdown the system. I'm sure there are free software that already do that. Will update if I find any.

share|improve this answer
This could probably be done with AutoHotkey and the Windows ping command. – Nathaniel Jan 26 '10 at 6:19

A simple solution would write an AutoIt program that attempts to ping your internet service provider's DNS resolver. This is the only true way to detect if you're "connected" to the internet or not, since it's not always reliable to ping third party websites.

I would set it up to ping every minute, and if no response is received for 5 minutes, shut the computer down (or set it to go to sleep mode). Fortunately, AutoIt has a built-in Ping() and Sleep() functions.

The simple script would look like the following:

Local $i = 0
While $i < 5                             ; Looping until we hit 5 attempts...
    If Ping("", 10000) == 0 Then  ; If we couldn't ping...
        $i = $i + 1                          ; Increment the counter.
    Else                                     ; Else, if we could,
        $i = 0                               ; Reset the counter.
    Sleep(60000)                             ; Finally, loop every minute.

; If the script gets here, we missed 5 pings - take action.
Shutdown(32)    ; See the Shutdown() documentation, this makes the PC sleep.

Before you run the computer overnight, you could then just execute the above script. To continue using your computer normally, simply close the script.

Disclaimer: I have not tested this code (I wrote it quickly in Notepad++), but it looks viable.

share|improve this answer

"Timed Shutdown 0.51b" can help you.
It has a built-in shutdown feature whenever you are disconnected from Internet, and it also includes timed or scheduled shutdown features.

Try this link to download:

share|improve this answer
  • DownOff is a mini free application it will auto shutdown your PC , when your internet connection disconnects or download rate drops below a mentioned rate .

enter image description here enter image description here

  • DownOff also lets you choose between Hibernate, Monitor, Power off, Reboot, Shut Down and Standby. The application maintains logs to let you analyze the previous system shutdown information.

Go here for more information

enter image description here

share|improve this answer

There is a download manager called FlashGet that has this feature built in.

From the menu documentation:

Shut Down When Done: When this is set, FlashGet will disconnect from internet and shutdown your computer on exit (usefull if you leave your PC turned on only to download files).

share|improve this answer
The poster asked for when the internet drops not when his download finishes. – MrStatic Mar 17 '10 at 2:43

You must log in to answer this question.