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

When I run my command prompt on Windows Vista Home Edition (my current version), it works well.

The default location of C:/Users/USERNAME works fine for non-admin commands.

However, this bizarre oddity happened today when I ran it as administrator, the startup location read:


(that's the MySQL install within my localhost)

Why is this, and how can I restore it back to C:/Windows/system32 for starting elevated command prompts?

I'm not sure what to do, and can't find much on how to repair this.

Anyone else came across this bizarre situation before?

share|improve this question

If you are using a shortcut to launch the command window, right click on the shortcut and select properties, check the "start in" box, see what the path is, it should be %HOMEDRIVE%%HOMEPATH%

If not change it to that, if it is set to that path, you need to check your homepath variable

To check and change the home path variable, open an elevated command prompt and type

set home

hit enter, this will show you what is set for your homepath, what does it say.

what mine looks like,

. enter image description here

You can do a

set /?

this will show you the commands to change it to your user account path

use the command:

set homepath=\users\your user account name

hopefully this will fix your issue.

enter key will run the command you enter

You will notice my command window opened at system32 instead of the path set in "start in", this is because I opened it as an Administrator which appears to override the "start in" path of the shortcut. It defaults to the path where the actual cmd.exe resides in the system32 folder. .

share|improve this answer
%HOMEDRIVE%%HOMEPATH% is %windir%\system32\cmd.exe but for some reason it takes me to the location above... no idea why it's doing this. – Occuld Apr 14 '11 at 23:01
I wonder if some sort of system variable was set. You can check this in system properties > advanced tab > environment variables – Moab Apr 15 '11 at 0:43

You must log in to answer this question.

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