Shortcut command to shutdown without cmd popup


  1. Posts : 21
    Genuine Windows® 7 Ultimate x64
       #1

    Shortcut command to shutdown without cmd popup


    Hello, I tried many commands with switches to shut down the system, but everything is popping a prompt and closes itself withing seconds. This is very annoying. Are there any way to shut down silently like default power button do?
      My Computer


  2. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #2

    The command shutdown -s -t XXX shuts down the computer after XXX seconds. To give user time to abort an unwanted scheduled shutdown, Windows will warn user. Screenshot below shows the prompt in Windows 8.1, the idea is the same in Windows 7:

    Shortcut command to shutdown without cmd popup-2014-06-02_14h17_12.png

    When prompted, user can then give the abort command shutdown -a to cancel shut down. If you want to shutdown immediately without any prompts, the command is shutdown -s -t 0.

    Kari
      My Computer


  3. Posts : 611
    Windows 8.1
       #3

    Kari said:
    The command shutdown -s -t XXX shuts down the computer after XXX seconds. To give user time to abort an unwanted scheduled shutdown, Windows will warn user. Screenshot below shows the prompt in Windows 8.1, the idea is the same in Windows 7:

    Shortcut command to shutdown without cmd popup-2014-06-02_14h17_12.png

    When prompted, user can then give the abort command shutdown -a to cancel shut down. If you want to shutdown immediately without any prompts, the command is shutdown -s -t 0.

    Kari
    Just a quick correction for you there Kari,

    If you want to fully shutdown the system, without any delay / prompts you need to use the -f flag for a forceful shutdown, this will stop any programs that are being used in admin mode and it stops all services.

    The full shortcut would look like this,

    shutdown.exe /f /s /t 0

    This would then provide an immediate, no prompt shutdown.

    Fun fact, you can also use the -c flag to customize the shutdown message. Just add it to the end of the switch followed by your message.
      My Computer


  4. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #4

    Windows is quite good in closing applications when the shutdown command is given; I use the delayed command (-t XXX secs) daily on a couple of rigs without the -f switch, for instance as a sleep timer on my bedroom desktop when watching some videos or listening music when going to bed, never had any issues.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:27.
Find Us