?
Solved

Batch file for Restarting Windows

Posted on 2007-08-06
6
Medium Priority
?
277 Views
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
0
Comment
Question by:al4629740
  • 2
  • 2
5 Comments
 
LVL 38

Accepted Solution

by:
Shift-3 earned 2000 total points
ID: 19639832
Try this:
shutdown -r -f -m \\LOC958 -t 0

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

Author Comment

by:al4629740
ID: 19643054
Do I still use the shutdown command?
0
 
LVL 32

Expert Comment

by:r-k
ID: 19643518
"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.
0
 
LVL 32

Expert Comment

by:r-k
ID: 19649653
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.
0
 

Author Comment

by:al4629740
ID: 19649925
ok. thanks
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

864 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