Windows 7 Administrator Command Prompt "Start in" Path

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.


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.


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

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Open Command Window Here (Administrator)"

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="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

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\runas]
@="Open Command Prompt (Administrator)"

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\runas\command]
@="cmd.exe"

Usage

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

Source