Batch file for Restarting Windows

Posted on 2007-08-06
Last Modified: 2013-11-05
I am trying to create a batch file and I am using the following to restart my computer but it is not working.  What is wrong?
restart /s /f /m \\LOC958
Question by:al4629740
    LVL 38

    Accepted Solution

    Try this:
    shutdown -r -f -m \\LOC958 -t 0

    The "-m \\LOC958" isn't necessary if you're restarting the local machine.

    Author Comment

    Do I still use the shutdown command?
    LVL 32

    Expert Comment

    "Do I still use the shutdown command?"

    Yes, because "restart" is not a valid XP command. Is it something you downloaded yourself?

    To see all options for "shutdown", just type"shutdown /?" at a command prompt.
    LVL 32

    Expert Comment

    Thanks for accepting the answer. However, I was mainly confirming what Shift-3 already said, so it would be more fair to give him the credit, or at least split the points. If that is what you intended as well you can post a 0-point question in the support area (link at upper-right corner of this page) and ask them to re-open the question.

    Thanks again, and I hope you got the reboot working from the batch file.

    Author Comment

    ok. thanks

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video discusses moving either the default database or any database to a new volume.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now