locked
Shutdown command (cmd) not working

    Question

  • I was tinkering with creating shortcuts to pin to the Metro.  This bug has occurred on two machines thus far that I tested it on.

    I was doing a simple shutdown -r -t 00 and shutdown -t 00 to create a Restart and Shutdown shortcut.  The Reboot shortcut works fine but then things got weird.  The Shutdown shortcut does not work, it quickly opens/closes a Command Prompt with the shutdown /? text.

    I tried opening a command prompt and doing a plain old shutdown and it gives me the same response (shutdown /? text).  I went into the System32 folder and double-clicked the shutdown executable, same result.  Tried rebooting, no help.  Seems like I managed to break the shutdown command lol.

    I also tried using shutdown /r /t 00 as well.  I tried a variety of tests, none worked.

    I tried the whole process again on another PC and the same results occurred.


    • Edited by cjt20one Wednesday, March 7, 2012 10:57 PM
    Wednesday, March 7, 2012 10:57 PM
    Avatar of cjt20one
    cjt20one
    35
    Points
    Top 30
    cjt20one
    Joined Oct 2011

    1

    35 Points

Answers

All replies

  • have you tried using the "s" option ? you don't mention that one.

    shutdown /s/t 0


    Alsx Verboon www.verboon.info

    Wednesday, March 7, 2012 11:42 PM
    Avatar of Alex Verboon-
    Alex Verboon-
    6,565
    Points
    Top 1
    Alex Verboon-
    Partner Joined Jun 2008

    1

    2

    16

    BaseVISION
    (Partner)
    6,565 Points
  • I just ran both commands on Windows 8 and can verify that:

    shutdown -r -t 0
    shutdown -s -t 0

    Work perfectly fine, no issues with reboots. I tried this on two Windows 8 machines, one virtual one physical with identical results.

    Thursday, March 8, 2012 7:14 AM
    Avatar of Jaap Brasser
    Jaap Brasser
    59,501
    Points
    Top 0.1
    Jaap Brasser
    MCC, MVP Joined Jul 2008

    4

    8

    18

    (MCC, MVP)
    59,501 Points
  • The commands should work.  What also works is hitting the  Win Key +R (saves me from pinning all kinds of things to clutter the start menu and saves me going to the start menu) and typing in

    shutdown /r (for reboot)
    shutdown /l to log off
    shutdown /s shutdown system
    shutdown /g to reopen most applications that were previously open

    There are a number of other more detailed switches for shutting down  remote computers, or for using the shutdown event tracker.

    You can type shutdown /? at the command prompt for further details.


    Win8to10

    Thursday, March 8, 2012 9:19 AM
  • I was tinkering with creating shortcuts to pin to the Metro.  This bug has occurred on two machines thus far that I tested it on.

    I was doing a simple shutdown -r -t 00 and shutdown -t 00 to create a Restart and Shutdown shortcut.  The Reboot shortcut works fine but then things got weird.  The Shutdown shortcut does not work, it quickly opens/closes a Command Prompt with the shutdown /? text.

    I tried opening a command prompt and doing a plain old shutdown and it gives me the same response (shutdown /? text).  I went into the System32 folder and double-clicked the shutdown executable, same result.  Tried rebooting, no help.  Seems like I managed to break the shutdown command lol.

    I also tried using shutdown /r /t 00 as well.  I tried a variety of tests, none worked.

    I tried the whole process again on another PC and the same results occurred.


    I had the same issue with Windows 8 RTM.  If you're using UAC, you need to start the command prompt with administrator privledges in order to run the shutdown command from the command prompt.  When you aren't an admin and you type shutdown it doesn't work and you get no response in the console window to indicate why.

    That was the only way I was able to get it to work (then, it works normally as it always has in the past).

    Reference:  http://www.open-db.info/OpenDb/Article.aspx?ArticleId=124&CategoryId=3

    Tuesday, August 28, 2012 5:48 PM
    Avatar of bpell
    bpell
    2,380
    Points
    Top 5
    bpell
    Joined Dec 2005

    2

    14

    the Indiana University F...
    2,380 Points
  • Hi all,

    I too am struggling with shutdown commands - but these work when typed into a cmd prompt but not when using .bat or .cmd files.

    When ran - then .cmd/.bat just runs the 'echo' operation and the window then hangs (its possible to ctrl+c to end the batch job). It seems using .cmd  and .bat to run shutdown and restart isn't working.

    I simply have 'shutdown /r' and 'shutdown /s' in the files with a single echo before it.

    thanks


    Curby forum posts for SP2 RU4 info

    Saturday, December 1, 2012 11:51 AM
    Avatar of Curbysan
    Pannone LLP
    0 Points