修改window的命令行默认工作目录

Change Command Prompt Default Directory


This is a simple registry hack to change the default directory you see when opening command prompt. I like to have it set to the OS root drive, but you can change it to whatever you like. This will keep you from having to use the "change directory" switch every time you open command prompt, which can be more than a little annoying.

1.) Open up registry editor by typing "regedit" [without the quotes] in the search box, and then clicking on the link up top.

2.) Navigate to the key HKEY_CURRENT_USER \ Software \ Microsoft \ Command Processor and search for the string "Autorun" in the left window. If that string is not existing yet, create it. Double-click it afterwards and add the new directory path in the following way: CD /d C:\

3.) If you would like the command prompt to open in the system32 folder, use this string instead:
CD /d C:\windows\system32

4.) Close the registry editor, and then open the command prompt to check your work.

As you can see, you can easily change the default directory to whatever you like. Hope this helps you from being annoyed at the command prompt.

Here's the rusult....


要点:找注册表的过程中,如果没有该目录全部新建即可

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值