Start elevated command prompt in %UserProfile% directory by default?

Solution 1:

Opening an elevated command-prompt always starts in %systemroot%\System32, the rationale being that if you are doing something requiring elevated privileges, you are likely to be working on system files as opposed to just the user’s own files which you can do without elevated privileges.

You can work around it:

  1. Open a registry editor (e.g., regedit)
  2. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Command Processor
  3. Edit the Autorun value to read cd /d %userprofile%

Now whenever you open a command-prompt, it will either start in or switch to, as the case may be, the user profile directory. Also, instead of HKCU, you can set the value in the HKLM branch to do it for all users on the system.