web前端开发经常要在项目目录下启动cmd,window+R启动,定位到项目目录非常麻烦,就想能不能有个快捷方式,查了下果然有,不废话,直接上方法
1 Windows Registry Editor Version 5.00 2 3 [HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere] 4 @="在此处打开命令提示符" 5 "Icon"="cmd.exe" 6 7 [HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command] 8 @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList ‘/s,/k, pushd,%V‘ -Verb RunAs\"" 9 10 [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere] 11 @="在此处打开命令窗口" 12 "Icon"="cmd.exe" 13 14 [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command] 15 @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList ‘/s,/k, pushd,%V‘ -Verb RunAs\"" 16 17 [HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere] 18 @="在此处打开命令窗口" 19 "Icon"="cmd.exe" 20 21 [HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command] 22 @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList ‘/s,/k, pushd,%V‘ -Verb RunAs\"" 23 24 [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere] 25 @="在此处打开命令窗口" 26 "Icon"="cmd.exe" 27 28 [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command] 29 @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList ‘/s,/k, pushd,%V‘ -Verb RunAs\""
新建txt将如上代码赋值保存到新的文件夹,将后缀改为reg,双击运行就可以了