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 am trying to shutdown my PC using the command prompt in Windows 7. But it says that the command shutdown doesn't exist.

Actually, I accidentally deleted the path variable in the environment variables and I suppose because of that, the command isn't found. How can I set the path variable to enable shutdown via command line?

share|improve this question
up vote 7 down vote accepted
  1. Select Computer from the Start menu
  2. Choose System Properties from the context menu
  3. Click Advanced system settings > Advanced tab
  4. Click on Environment Variables, under System Variables, find PATH, and click on it.
  5. In the Edit windows, modify PATH
  6. use ; (semicolon) for separating path entry texts

As you want shutdown.exe you want to have %SystemRoot%\System32 in your path.

If you want to restore the path variable to the default then here is the entire string:

share|improve this answer

You must log in to answer this question.

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