How to configure the Windows 10 command line path so that when you open the command line there is always such a sample:

D:\works\projects 

Transitions cd not to offer.

    1 answer 1

    Enter or create, if not, a key in the registry at HKEY_CURRENT_USER\Software\Microsoft\Command Processor with the name "Autorun" , the value of which will be the command to go to your folder.

    Well, or just copy the text below into the temp.reg file and run:

     Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Command Processor] "Autorun"="cd /d \"D:\\works\\projects\"" 

    After making (even without rebooting), the CMD will open in the correct folder.

    • In general, this is bad advice. With this command, the current working directory of the script is changed, no matter where it is launched from. For example, if you make the dir command in it, it will show the directory not from the place where it was launched, but from the current working directory (ie D:\works\projects ) - Gennady P
    • @GennadiP I agree. But here it depends on the user that he needs more. I'm not lazy to do a cd after launch :) - Viktor Tomilov
    • It's easier to make a shortcut and run through it. - Gennady P
    • @GennadiP is easier to create a plugin like "cmd here", in my opinion, but, I repeat, everyone has his own. - Viktor Tomilov