Windows 10: Make Elevated Command Prompt open to %userprofile% Solved

  1. Ztruker's Avatar
    Posts : 6,434
    Windows 10 Pro X64 17134.191
       03 Mar 2016 #1

    Make Elevated Command Prompt open to %userprofile%


    I have the Command Prompt icon on my Taskbar as I use it a lot. It's set to always run as Administrator, so when I launch it, the Command Prompt window opens to C:\Windows\system32.

    I want it to open to %userprofile% which is C:\Users\myaccountname.

    Has anyone found a way to do this. Using the Start in filed of properties doesn't work.
      My ComputersSystem Spec

  2. Brink's Avatar
    Posts : 33,210
    64-bit Windows 10 Pro build 18262
       03 Mar 2016 #2

    Hello Rich, :)

    You could create a shortcut using the command below, then set the shortcut to "Run as administrator" to do so.

    cmd /s /k cd %UserProfile%

    Run as Administrator in Windows 10 - Windows 10 Forums
      My ComputersSystem Spec

  3.    04 Mar 2016 #3

    I want it to open to %userprofile% which is C:\Users\myaccountname.
    That would be a standard command prompt (non-admin)
      My ComputerSystem Spec

  4.    04 Mar 2016 #4

    WinX Menu, #9
      My ComputerSystem Spec

  5. Brink's Avatar
    Posts : 33,210
    64-bit Windows 10 Pro build 18262
       04 Mar 2016 #5

    I believe Rich is wanting to open an elevated command prompt, but have it open to %UserProfile% instead of the default System32.
      My ComputersSystem Spec

  6.    04 Mar 2016 #6

    Edit:

    Better method

    Modify the shortcut target to:
    Code:
    %COMSPEC% /C PUSHD %USERPROFILE% && %COMSPEC%
    That should work
      My ComputersSystem Spec

  7. topgundcp's Avatar
    Posts : 2,438
    Ubuntu14.04x64 MintMate17x64 Win10Prox64
       04 Mar 2016 #7

    You asked the same question and was answered 6 months ago:
    Solved Get elevated command prompt to open in my user directory - Windows 10 Forums
      My ComputerSystem Spec

  8. Ztruker's Avatar
    Posts : 6,434
    Windows 10 Pro X64 17134.191
    Thread Starter
       04 Mar 2016 #8

    topgundcp said: View Post
    You asked the same question and was answered 6 months ago:
    Solved Get elevated command prompt to open in my user directory - Windows 10 Forums
    Sorry, my mind isn't what it used to be I guess. I had completely forgotten about that thread.

    I saved info from both threads this time and now have a working Admin Command prompt that opens to my user profile folder.

    Thanks everyone.

    Hydranix, I haven't tried your suggestion yet, will in a few minutes though.

    Edit: Hydranix, yes, this works well also. Thanks
      My ComputersSystem Spec

  9. Brink's Avatar
    Posts : 33,210
    64-bit Windows 10 Pro build 18262
       04 Mar 2016 #9

    No worries Rich. Glad we could help. :)
      My ComputersSystem Spec


 

Related Threads
Command Prompt won't open in General Support
Hi, whenever I try to open the Command Prompt in Win10 (cmd.exe) I get the following pop up: cmd.exe - Application Error The Application was unable to staart correctly (0XCoooo142). Click OK to close the application. I should add this was an...
General Tips Open Command Prompt in Windows 10 in Tutorials
A command prompt is an entry point for typing computer commands in the Command Prompt window. By typing commands at the command prompt, you can perform tasks on your computer without using the Windows graphical interface. This tutorial will show...
A command prompt is an entry point for typing computer commands in the Command Prompt window. By typing commands in an elevated command prompt, you can perform tasks that require administrator rights on your computer without using the Windows...
I can not open command prompt. in General Support
I can not open command prompt. Every time I open it I got error message come up. :( The message is said http://i.imgur.com/HZi67df.jpg
I changed Command Prompt on my Taskbar so when I click on it, it opens as Administrator. That sets the default directory as C:\WINDOWS\system32 which I don't like, since any files I create that do not have a path specified will be created there. ...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 22:36.
Find Us