Changing default startup directory for command prompt in Windows 7

后端 未结 23 2081
情深已故
情深已故 2020-11-30 19:50

How do I change default startup directory for command prompt in Windows 7?

I usually do the following to start command prompt from C:\\

  WIN-R (Run Promp         


        
23条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-30 20:00

    Edit: It actually seems that editing the file shortcut breaks the Win+x, c key shortcut. (Moral of the story: only change system files you know how to fix! Eventually after a Windows update it repaired itself.)

    What I ended up doing is creating a new customized Command Prompt shortcut in the start folder and pinned to the taskbar that I launch instead of cmd.exe


    As other answers point out, changing the registry Autorun cmd start location is a bad idea because it silently will break other programs that shell out for tasks, like Visual Studio Code.

    You should just change whatever shortcut you use to open cmd to have a Start In entry.

    If you use Win+x, c to launch cmd, you can edit the Start In for

    "%LOCALAPPDATA%\Microsoft\Windows\WinX\Group3\02 - Command Prompt.lnk"
    

提交回复
热议问题