1、在设置前,系统右键菜单,并没有“在此处打开命令窗口”;
2、打开记事本,将如下内容复制到记事本中;
01Windows Registry Editor Version 5.00
02[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
03@="在此处打开命令提示符"
04"Icon"="cmd.exe"
05[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command]
06@="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""
07[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
08@="在此处打开命令窗口"
09"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\""
复制代码
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\""
3、点击记事本左上角的“文件”,在下拉菜单中选择“另存为”;
4、在打开的另存为窗口,先点击窗口左侧的“桌面”,然后在在文件名(N)栏中输入“OpenCmdHere.reg”,再点击“保存”;
5、回到系统桌面,左键双击“OpenCmdHere.reg”注册表文件图标,这时会弹出一个编辑器对话框,点击“是”;
6、点击“是”以后,紧接着又会弹出一个注册表编辑器对话框,点击“确定”;
7、这样操作之后,桌面右键菜单就成功添加“在此处打开命令窗口”选项了。