• Command-line Reboot Command

    Home » Forums » AskWoody support » Windows » Windows 8.1 » Questions: Win 8.1 (and Win 8) » Command-line Reboot Command

    • This topic has 13 replies, 7 voices, and was last updated 11 years ago.
    Author
    Topic
    #494060

    I would like for a batch file that I’m designing to be able to cause the laptop to reboot. Can someone give me the commandline string that will do that?

    By the way, the file manager that came with Win8.1 is driving me crazy! For example, I have finally found the startup folder for my Administrator account but even when it is being displayed in file Explorer the left pane does not show some of the folder names that are in that folder string! Is there some way to fix that?

    Thanks,
    Bill

    Viewing 10 reply threads
    Author
    Replies
    • #1446829

      shutdown.exe -r -t 00

      See http://pcsupport.about.com/od/commandlinereference/p/shutdown-command.htm for more info.

      Hope this helps…

    • #1446838

      You can save one character from that command line by simply putting -t 0 !

      BATcher

      Plethora means a lot to me.

    • #1446839

      Re explorer – click on “view” and check the “hidden items” box.

      • #1446844

        Re explorer – click on “view” and check the “hidden items” box.

        Mikey, I aleady had that Hidden Items thing checked and that hasn’t done any good. So far it seems that the only way to get to all the hidden things is to start by typing in “%AppData%” and then all the things under it become visible! That is terrible in my opinion.

        Thanks,
        Bill

    • #1446841

      Rick, that link gave me all I could ever want about running shutdown.exe so I’m all set now. I have it running like I expected, now.

      Batcher, thanks for the suggestion.

      Thanks,
      Bill

    • #1446857

      Hmm, when I type in %appdata%, all the folders on the right are on the left as well. I’ve never seen it when the left and right panes are different.

      Hmm, “the ones on the left are on the right and the ones in the middle are….”. Could be a song 😉

      Eliminate spare time: start programming PowerShell

    • #1446890

      I guess you are correct. The highlighting in the left pane is so light (practically invisible) I didn’t notice that it moved to a different place when I entered %appdata% and hit enter. It actually does not scroll to make the Appdata item visible if it is not but if I go looking for it in the left pane I can almost tell that it is highlighted. However, I have not found any way to discover that folder path by navigating in the left pane unless I actually type %appdata% in the address bar! That is very weird to me!.

      Thanks,
      Bill

    • #1446937

      You might like to try one of the Windows Explorer third-party alternatives, whose features are to a limited extent demand-driven? I use xplorer2 (where the ‘2’ should be a superscript), and my link points to the ‘lite’ (free) version. It has the merit of consistency across versions of Windows, among many others.

      BATcher

      Plethora means a lot to me.

      • #1446965

        You might like to try one of the Windows Explorer third-party alternatives, whose features are to a limited extent demand-driven? I use xplorer2 (where the ‘2’ should be a superscript), and my link points to the ‘lite’ (free) version. It has the merit of consistency across versions of Windows, among many others.

        I have changed some of the View settings in the standard File Explorer and it is much better than it was! I’m still going to get xplorer2 and try it but I haven’t gotten that far yet.

        Thanks,
        Bill

    • #1446951

      Thanks for the link Batcher. I started out thinking I would make myself learn to live with the real Win8.1 stuff but I’m ready to look for something that seems to make a little more sense so I’ll give that one a try.

      Bill

    • #1447055

      To see all the files and folders, in addition to what you’ve done already, you need to go to View | Options | Change folder and search options. Click on the “View” tab. Scroll down and clear the “Hide protected operating system files” checkbox.

      Joe

      --Joe

    • #1447073

      Microsoft Windows [Version 6.1.7601]
      Copyright (c) 2009 Microsoft Corporation. All rights reserved.

      C:UsersUsername>shutdown
      Usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f] [/m \computer][/t xxx][/d [p|u:]xx:yy [/c “comment”]]

      No args Display help. This is the same as typing /?.
      /? Display help. This is the same as not typing any options.
      /i Display the graphical user interface (GUI). This must be the first option.
      /l Log off. This cannot be used with /m or /d options.
      /s Shutdown the computer.
      /r Shutdown and restart the computer.
      /g Shutdown and restart the computer. After the system is rebooted, restart any registered applications.
      /a Abort a system shutdown. This can only be used during the time-out period.
      /p Turn off the local computer with no time-out or warning. Can be used with /d and /f options.
      /h Hibernate the local computer. Can be used with the /f option.
      /e Document the reason for an unexpected shutdown of a computer.
      /m \computer Specify the target computer.
      /t xxx Set the time-out period before shutdown to xxx seconds. The valid range is 0-315360000 (10 years), with a default of 30. If the timeout period is greater than 0, the /f parameter is implied.
      /c “comment” Comment on the reason for the restart or shutdown. Maximum of 512 characters allowed.
      /f Force running applications to close without forewarning users. The /f parameter is implied when a value greater than 0 is specified for the /t parameter.
      /d [p|u:]xx:yy Provide the reason for the restart or shutdown.
      p indicates that the restart or shutdown is planned.
      u indicates that the reason is user defined.
      If neither p nor u is specified the restart or shutdown is unplanned.
      xx is the major reason number (positive integer less than 256).
      yy is the minor reason number (positive integer less than 65536).

      Reasons on this computer:
      (E = Expected U = Unexpected P = planned, C = customer defined)
      Type Major Minor Title

      U 0 0 Other (Unplanned)
      E 0 0 Other (Unplanned)
      E P 0 0 Other (Planned)
      U 0 5 Other Failure: System Unresponsive
      E 1 1 Hardware: Maintenance (Unplanned)
      E P 1 1 Hardware: Maintenance (Planned)
      E 1 2 Hardware: Installation (Unplanned)
      E P 1 2 Hardware: Installation (Planned)
      E 2 2 Operating System: Recovery (Planned)
      E P 2 2 Operating System: Recovery (Planned)
      P 2 3 Operating System: Upgrade (Planned)
      E 2 4 Operating System: Reconfiguration (Unplanned)
      E P 2 4 Operating System: Reconfiguration (Planned)
      P 2 16 Operating System: Service pack (Planned)
      2 17 Operating System: Hot fix (Unplanned)
      P 2 17 Operating System: Hot fix (Planned)
      2 18 Operating System: Security fix (Unplanned)
      P 2 18 Operating System: Security fix (Planned)
      E 4 1 Application: Maintenance (Unplanned)
      E P 4 1 Application: Maintenance (Planned)
      E P 4 2 Application: Installation (Planned)
      E 4 5 Application: Unresponsive
      E 4 6 Application: Unstable
      U 5 15 System Failure: Stop error
      U 5 19 Security issue
      E 5 19 Security issue
      E P 5 19 Security issue
      E 5 20 Loss of network connectivity (Unplanned)
      U 6 11 Power Failure: Cord Unplugged
      U 6 12 Power Failure: Environment
      P 7 0 Legacy API shutdown

      C:UsersUsername>

    • #1447114

      Thanks Joe, I already had checked that a few days ago.

      Thanks Prescott, that is a pretty good summary of details about the shutdown command.

      Bill

    Viewing 10 reply threads
    Reply To: Command-line Reboot Command

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: