win10右键菜单增加open_cmd快捷键
自换win10以来,shift+右键菜单里面的cmd被缓存powershell,换了也就罢了,但是powershell有诸多不变,首先是启动慢的问题,而且还有一些东西无法加载。在网上也看到有些网页存在类似的问题,没办法,把powershell换成cmd吧。
右键菜单打开powershell的注册表地址是:
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\cmd
下面说说如何做。
首先新建一个文本文档,输入如下内容:
Windows Registry Editor Version 5.00
02[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
03@="OpenCmdHere"
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@="OpenCmdHere"
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@="OpenCmdHere"
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@="OpenCmdHere"
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\""
另存为 xxx.reg
,注意必须是reg结尾。
上面的@="OpenCmdHere"
表示右键菜单显示的名称,本来是在此处打开命令行
,但是用中文会乱码,就用英文了.
之后双击xxx.reg
,将reg导入到注册表中,同时在
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell
中就能看到刚才导入的注册项了,随便在一个文件夹下,按住shift+鼠标邮件,应该能看到OpenCmdHere
选项了。