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