Comment by apublicfrog

22 days ago

Yes. This is how I've been shutting down windows PCs for decades, as I don't want to use a mouse and start menu positioning varies:

Windows + R

(type) shutdown /s /t 0

Enter

The /t is a time flag and you can abort scheduled shutdowns with the /a flag. Handy if you know your Windows machine will be finished with a task in 10 or so minutes but you need to leave - just set a timer for 1800 seconds and Kazaa will be done with its download ;).

> Handy if you know your Windows machine will be finished with a task in 10 or so minutes but you need to leave

That might maybe work most times, but when your network speed suddenly changes or the downloads is aborted it fails. Far better is just telling your computer that you want it to shutdown after the download finished:

    wget ... && shutdown now

Should also work on MS Windows, IE used to be able to be told to exit once the download finishes, not sure how the situation looks like now.

  • Agreed, but I've found Windows to be relatively finicky with the shutdown command, with some OS versions being fine with that and some not. Additionally, on Windows often the action needed is a GUI program with no simple way to post-hook or provide an output a CLI can easily ready.

    As such I usually set my timer 3x what it needs to be (e.g 1800 for a 10 minute) and it's always had a high chance of working.