windows10右鍵命令行

最近在弄react-native,每次運行都要cd好幾下,突然想起之前系統中在右鍵菜單的時候見過cmd直接進入到指定目錄。於是百度了一下果然發現了:

Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
@="在此處打開命令提示符"
"Icon"="cmd.exe"
 
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""
 
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
@="在此處打開命令窗口"
"Icon"="cmd.exe"
 
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""
 
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere]
@="在此處打開命令窗口"
"Icon"="cmd.exe"
 
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""
 
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere]
@="在此處打開命令窗口"
"Icon"="cmd.exe"
 
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""

 

在文本文檔中粘貼後,改後綴名爲.reg。點擊運行就行了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章