Changing default startup directory for command prompt in Windows 7

后端 未结 23 2040
情深已故
情深已故 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:16

    While adding a AutoRun entry to HKEY_CURRENT_USER\Software\Microsoft\Command Processor like Shinnok's answer is the way to go it can also really mess things up, you really should try to detect a simple cmd.exe startup vs a script/program using cmd.exe as a child process:

    IF /I x"%COMSPEC%"==x%CMDCMDLINE% (cd /D c:\)
    

提交回复
热议问题