A One-Click Shutdown Timer for Windows


Windows can already shut itself down on a timer, but only from the command line. You open a terminal, type shutdown /s /t, and convert the delay into seconds yourself. Cancelling it means remembering a second command, shutdown /a. I wanted to skip all of that: double-click one file, pick a time, and have an equally easy way to call it off.

Version 1

Version 1 is a single VBScript built around a Yes/No/Cancel prompt. Yes starts a fixed 1-hour timer with shutdown /s /t 3600. No cancels a pending one with shutdown /a. It waits for each command’s exit code so it can tell you whether it worked. If a timer is already running when you try to start one, it offers to cancel it.

Version 2

Version 2 is the full tool, packed into a single .cmd file that is both a batch script and a PowerShell script. A short batch header starts a hidden PowerShell process, which reads the rest of the same file as code.

That code builds a small Windows Forms window with preset buttons (15 minutes, 30 minutes, 1 hour, 2 hours) and a cancel button. Each preset clears any existing timer before scheduling a new one, and the window shows the exact time the PC will shut down.

Everything it needs ships with Windows, so there’s nothing to install. It also no longer depends on VBScript, which Microsoft is phasing out.

Downloads

Both versions are on GitHub. Open a file and use the download button at the top right of the file view.

How to use it

  • v1: double-click the file, then click Yes to shut down in 1 hour, No to cancel a scheduled shutdown, or Cancel to close.
  • v2: double-click the file, then pick a time or click Cancel timer. A console window flashes briefly before the timer window opens.
  • Windows may warn you the first time because the file came from the internet. Click More info → Run anyway, or right-click the file and choose Properties → Unblock.
  • v2 won’t run from a folder whose path contains an apostrophe (').