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....
 
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.
 
or i could just press "shutdown"?
 
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.
 
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?
 
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

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
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.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back