Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

So, I know you can create a shortcut to an administrator-level command prompt (as described in this question), but what I'm seeing is that whenever I use such a shortcut, it always drops me into c:\windows\system32\ path.

I've tried specifying that shortcut's properties to set the "start in" path I need, but to no avail. It seems any time I run cmd.exe "As Administrator," it completely disregards the shortcut's paths and sticks to c:\windows\system32\

Any suggestions on how to get Windows 7 to respect the shortcut's "start in" path?

share|improve this question
up vote 30 down vote accepted

I found a way around this. In the shortcut, change the command line to:

C:\Windows\System32\cmd.exe /k "cd c:\"

In this case it changes the starting directory to the root of C:. You can set your own parameters.

share|improve this answer
Excellent, Peter. Thanks! – Alex Beynenson Jun 24 '10 at 11:10
Great answer, Thanks! – fwaokda Feb 9 '13 at 23:00
Great answer! Helped me out alot! – wefsdgdfgdfsg Jul 25 '14 at 21:30
But what is the reason? – ziyuang Feb 5 '15 at 1:04
You're still specifying a fixed directory instead of landing in the same directory from which the shortcut is activated. – bvj Mar 11 '15 at 23:58

It will happen if the place where you want to open your command prompt is on a different drive than the shortcut is. The solution is to put an additional command in the shortcut:

C:\Windows\System32\cmd.exe /k "a: & cd a:\something"

In this case it will change to the drive a: from the current drive, and than open the a:\something folder. The & operator is used to put multiple commands in a single line at the windows command prompt.

share|improve this answer
cd /d a:\something will change to a different drive and directory – Luke Jan 9 '13 at 23:32
This would work too: pushd a:\something – Br.Bill Jun 24 at 22:28

This is what I do:

First I create a shortcut for cmd.exe and place it into a directory that I will always keep from computer to computer.. e.g. c:\PersonalData\Windows Customize\Admin then I edit the shortcut to read as below (Domain and AdminUser you will need to change)

C:\Windows\System32\runas.exe /user:domain\AdminUser /savecred "C:\Windows\System32\cmd.exe /k cd c:\PersonalData"

Then I create a toolbar on my taskbar that points to the "Admin" Folder.. this is where I keep all my admin tools ... this works on WinXP and Windows 7..

Another thing that I will do is change the color of my background of this cmd prompt that easily identifies that I have my admin credentials open... if you want to be more secure take out the /savecred then it will prompt you for your admin password every time

share|improve this answer

Launch an elevated Command Prompt from the context menu

To add the Open Command Window Here (Administrator) option to the context menu for file system folders, use the following REG file:

Windows Registry Editor Version 5.00

@="Open Command Window Here (Administrator)"

@="cmd.exe /s /k pushd \"%V\""

To add the entry to Computer (My Computer) context menu, use the following REG file:

Windows Registry Editor Version 5.00

@="Open Command Prompt (Administrator)"



Copy the above contents to Notepad, and save the file with .REG extension. Then right-click the REG file and choose Merge.


share|improve this answer
This is a good suggestion, but not quite what I'm looking for. I'm looking for a way to create an arbitrary shortcut, which I can pin to the taskbar. – Alex Beynenson Dec 28 '09 at 2:39
i'm not sure if this is possible, unless you change the start directory for CMD globally: To change default path where cmd starts add/edit REG_SZ Autorun in HKEY_CURRENT_USER\Software\Microsoft\Command Processor replacing the Value Data with a folder or directory preceded by a CD\ – Molly7244 Dec 28 '09 at 3:12
Thanks for this suggestion. It's a decent workaround. – Alex Beynenson Dec 28 '09 at 13:22

You can right click CMD, select Properties and in the "Start in" box clear whatever is there, entering: %SystemRoot%\system32. Click OK.

share|improve this answer
This is not a good answer, the question explicitly said that the start in parameter isn't working, something which I can confirm in my Windows 10. – pgr Apr 6 at 10:16

The correct answer was given by Peter, but if you want to switch to a drive other than c: (assuming Windows is on c:) is to use

C:\Windows\System32\cmd.exe /k "cd /d d:\some_directory"
share|improve this answer

Easiest option I have found is to add a registry key. Run the following from an elevated command prompt:

REG ADD "HKLM\SOFTWARE\Microsoft\Command Processor" /v AutoRun /t REG_SZ /d "CD /D C:\"

NOTE: Close the command prompt afterwards and reopen and it will change to the root of the C drive.

This will work for all users.

Alternatively adding to current user works too (put it in a logon script, startup folder etc) but this would be dynamic of course.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.