Auto Shutdown PC


PrOuD InDiAn
Open Notepad

Copy and paste the script given below

@echo off
echo Enter Seconds To Shutdown
set /p stime=
echo Your PC Will Auto Shutdown after %stime%
choice /t %stime% /c yn /d y /n /m "Press 'n' to abort shutdown"

if ERRORLEVEL 2 goto ext
if ERRORLEVEL 1 goto sht

shutdown -s -t 00
goto ext


Save the text as AutoShutdown.bat

Double click the file, It will prompt to enter shut down time in seconds. Enter time in seconds and hit Enter. System will shut down at the specified time....


OSNN One Post Wonder
Or, you could just type:

shutdown -s -t XX


You can even use the shutdown command to remotely shutdown a machine. Like so...

shutdown -s (or -r for restart) -m \\whateverthecomputernameis -t 30

This assumes you have credentials on that machine. Works best in an environment with a domain of course.


F@H - Is it in you?
Staff member
Folding Team
Political User
Or use the Hobbylounge gadget for date/time that allows you to shut-down/restart or hibernate at the click of a button on your sidebar in Vista.


OSNN Addict
Folding Team
I was playing around this and my first thought as well was why not just use

shutdown -t XX

But it didn't work for me, it shutdown the machine immediately, I could get it to work for a remote machine, but not for the local machine.

Here's the real irony:

shutdown was first automatically included win WinXP (on 2K/NT it's in the resource kit I think)

choice is a command included with Win98 (but it is not automatically installed with XP though if you upgraded you would still have it.

So either way, you have to search for one of them shutdown.exe or Not everyone will have both.

Then I wonder, why would I want to do this? Automatically shutdown my machine from a shortcut? Maybe as a funny prank, or maybe to logout of the machine is idle for a specific period of time for strict security environments?