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

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

share|improve this question
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
up vote 3 down vote accepted

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.

share|improve this answer
Love your software, thanks for sharing! :) – HaydnWVN Dec 19 '11 at 9:33

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;'
share|improve this answer

I also found this tool: Shutdown timer.

enter image description here

share|improve this answer

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.

share|improve this answer
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .