在 Windows 7 中更改命令提示符的默认启动目录 [英] Changing default startup directory for command prompt in Windows 7
问题描述
如何更改 Windows 7 中命令提示符的默认启动目录?
我通常执行以下操作以从 C: 启动命令提示符
<上一页>WIN-R(运行提示)cmd/K cd C:我想执行以下操作以从 C: 启动命令提示符
<上一页>WIN-R(运行提示)命令同时添加一个 AutoRun 进入 HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor
就像 Shinnok 的回答是要走的路 它也确实会搞砸,你真的应该尝试检测一个简单的 cmd.exe 启动与脚本/program 使用 cmd.exe 作为子进程:
IF/I x"%COMSPEC%"==x%CMDCMDLINE% (cd/D c:)
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 Prompt) cmd /K cd C:
I want to do the following to start command prompt from C:
WIN-R (Run Prompt) cmd
While adding a AutoRun entry to HKEY_CURRENT_USERSoftwareMicrosoftCommand 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:)
这篇关于在 Windows 7 中更改命令提示符的默认启动目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!