Auto Shutdown PC

binoyxj

PrOuD InDiAn
Joined
4 May 2008
Messages
475
Open Notepad

Copy and paste the script given below

@echo off
echo Enter Seconds To Shutdown
set /p stime=
cls
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

:sht
shutdown -s -t 00
goto ext

:ext
exit

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....
 

clifgriffin

OSNN Newbie
Joined
3 May 2008
Messages
8
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.
 

Henyman

Secret Goat Fetish
Political Access
Joined
9 Jun 2002
Messages
9,606
or i could just press "shutdown"?
 

Sazar

Rest In Peace
Joined
12 Apr 2002
Messages
14,905
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.
 

JPRuss

OSNN Addict
Joined
5 May 2008
Messages
77
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 choice.com. 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?
 

abhishek_a01

OSNN Addict
Joined
4 May 2008
Messages
89
just wonderng ..after laptop contest how many ppl came to this forum and new things to everyone... good sign :)
 

Members online

No members online now.

Latest profile posts

hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.
Terrahertz wrote on Electronic Punk's profile.
Yo fellas!
Electronic Punk wrote on Sazar's profile.
Where are you buddy?
Perris Calderon wrote on Electronic Punk's profile.
Hey EP! All good with me, applying for Microsoft MVP right now, should have done this a while ago.

Notifications don't work, I only found your response by coming back to hunt up some threads, if you want, give me your email address so we can keep in touch easier!

Forum statistics

Threads
62,001
Messages
673,428
Members
5,594
Latest member
RandomCritic