I am downloading the Visual Studio Trial version and it seems like it will take an hour or so to finish. I would like to shutdown computer automatically after this download finishes.

So is it possible to configure an automatic shutdown after the completion of a download either through a batch script or some external program?

Edit: I want to know if there is a program that can analyze network activity and trigger the auto shutdown.

enter image description here

  • 1
    A batch script will not do, since the installer will most likely display a Finished dialogue once the download completes. One way would be to monitor internet traffic and shut the computer down if there is none for X minutes. But that would have the drawback of killing possible error messages. – Dennis Dec 16 '11 at 16:55
  • Yes I agree that there is this drawback. But this is fine for me. I am hoping that there is just a program that can analyze the network traffic and once it finds the no activity trigger the shutdown. – Animesh Dec 16 '11 at 17:01

DU Meter can (among other things) shutdown your computer if Internet traffic drops below a certain value (e.g. less than 100 KB in the last 10 minutes):

DU Meter Options

If using this together with some installer, the resulting solution will be rather brittle. If the installer shows an error message, you'll never see it since your computer will auto-shutdown. If the installer hangs, or waits for some user input, you'll never know, etc.

If, however, you can trigger download of an external content from the Internet without actually installing anything, then I think you'll be fine. I don't know about VS2010 specifically, but usually installers have means for downloading external content, e.g. for use on computers without direct Internet connection,etc.

Disclaimer: I'm the author of DU Meter.


You can use sort of tcpdump (or command-line Wireshark version) and script that will issue shutdown when number of lines from stdin per 10 seconds drops below some threshold.

perl -ne 'INIT{$q=10; $SIG{ALRM} = sub { system("shutdown -h now") if($q>0); $q=10; alarm 10;}; alarm 10; }; --$q;'

I also found this tool: Shutdown timer.

enter image description here


You can use the 'shutdown' command from a commandline (or Start/Run) and specify the time before it. Type "shutdown /?" at a command prompt to see.

Bear in mind the shutdown will initiate after the time period, NOT AFTER THE DOWNLOAD COMPLETES.

  • I know about this. I want to know if there is a program that can analyze network activity and trigger the auto shutdown. – Animesh Dec 16 '11 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.