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


  1. Posts : 5,150
    Windows 10 Pro X64 15063.483
       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. Posts : 23,589
    64-bit Windows 10 Pro build 16362
       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. Posts : 1,875
    Windows 3.1 to Windows 10
       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. Posts : 9,009
    Windows 10 Professional
       04 Mar 2016 #4

    WinX Menu, #9
      My ComputersSystem Spec


  5. Posts : 23,589
    64-bit Windows 10 Pro build 16362
       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. Posts : 2,036
    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. Posts : 5,150
    Windows 10 Pro X64 15063.483
    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. Posts : 23,589
    64-bit Windows 10 Pro build 16362
       04 Mar 2016 #9

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


 

Related Threads
How to Open an Elevated Command Prompt in Windows 10 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...
General Tips Open Command Prompt in Windows 10 in Tutorials
How to Open a Command Prompt in Windows 10 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...
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...
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 15:53.
Find Us