本文最后更新于 2025-03-11,文章内容可能已经过时。 The article content may be outdated.

右クリックでCMDを素早く起動する方法

如何通过右键快速启动CMD


Most of time, when we want op the cmd. we should open CMD frst, and then copy the path ,use cd 'path' to start command.

Now,you can open CMD from the current path by modifying the registry.

Creat a 'xx.reg', copy the following code into it,and then run it.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
@="open cmd"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\shell\OpeCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
@="open cmd"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere]
@="open cmd"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere]
@="open cmd"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""