Auto Shutdown PC

Discussion in 'Windows Applications' started by binoyxj, May 6, 2008.

  1. binoyxj

    binoyxj 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....
  2. clifgriffin

    clifgriffin 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.
  3. Henyman

    Henyman Secret Goat Fetish Political User

    or i could just press "shutdown"?
  4. Sazar

    Sazar F@H - Is it in you? Staff Member Political User Folding Team

    Between Austin and Tampa
    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.
  5. JPRuss

    JPRuss OSNN Addict Folding Team

    In the unknown
    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?
  6. abhishek_a01

    abhishek_a01 OSNN Addict

    just wonderng ..after laptop contest how many ppl came to this forum and new things to everyone... good sign :)