新建空白文件openCmd.reg,写入如下内容,双击运行就可以了。

  1. Windows Registry Editor Version 5.00
  2. [HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
  3. @="在此处打开命令提示符"
  4. "Icon"="cmd.exe"
  5. [HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command]
  6. @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""
  7. [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
  8. @="在此处打开命令窗口"
  9. "Icon"="cmd.exe"
  10. [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
  11. @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""
  12. [HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere]
  13. @="在此处打开命令窗口"
  14. "Icon"="cmd.exe"
  15. [HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command]
  16. @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""
  17. [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere]
  18. @="在此处打开命令窗口"
  19. "Icon"="cmd.exe"
  20. [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command]
  21. @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""