Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to make a simple bat file that restarts a server. It looks like this:

shutdown -r -f -t 60

But all it does is loop inside the cmd window, printing the command > new line > priting the command. Over and over.

Control + Alt + Delete only opens up the menu on the machine where I RDP in from and not on the server itself.

share|improve this question
What is the .bat file called? It's not shutdown.bat, is it? Also, Ctrl-Alt-End is the Ctrl-Alt-Delete in a RDP session. – tombull89 Sep 20 '11 at 8:19
@tombull89 atrl-alt-end, got it. thanks! – Jason94 Sep 20 '11 at 8:43
up vote 5 down vote accepted

Is your batch file called shutdown.bat? If so, the script won't call system restart, the name causes the script to loop.

Try to rename your batch file to something else, or, as a good geek, move to PowerShell. If you decide to switch, you'll need the Restart-Computer command.

share|improve this answer
Or be explicit: shutdown.EXE -r -f -t 60 – MSalters Sep 20 '11 at 12:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .