Windows shutdown command
August 21st, 2005
Problem
=========
I was using Windows Remote Desktop over SSH and my mouse stopped working. The mouse clicks weren't detected remotely. Logging out of the Remote Desktop session and back in again didn't fix the problem. The only thing that seemed like it would help was a restart. However, how do you restart the remote PC without mouse clicks? It's difficult, because the normal Shut Down option in the Start menu is transformed into a Disconnect option in a Remote Desktop session, which just cuts your remote connect. You can't right-click the Windows toolbar to get the Task Manager window, and you can't Ctrl-Alt-Delete because this is picked up by your local PC rather than the remote PC.
Solution
==========
Use Windows XP's shutdown command. This is very similar to the UNIX shutdown command. Note: Windows 2000 doesn't have a shutdown command.
Go to Start > Run.
In the Run dialog box, enter:
shutdown -r
to restart Windows (or -s to stop Windows).
You get a 30-second countdown, during which time, if you change your mind, you can abort the shutdown by going back to the Run dialog box and entering:
shutdown -a
If you want a quicker restart you can add a time flag to the end of the command, e.g. for 1 second rather than 30:
shutdown -r -t 1
To find out more, open a command console window and type:
shutdown /?
Note: This command doesn't reboot the PC, it just restarts Windows, but this is often enough to solve your problem – for example, in my case it got me my mouse clicks back again.
Potentially similar posts
- Scan for available IP addresses – August 2011
- Adding your choice of text editor to Flare’s Open With menu – December 2010
- Fix “No topics found” issue in CHM output – November 2010
- Perl basics for beginners (on Windows) – August 2010
- Preventing BBC iPlayer running all the time – November 2008