Win10资源管理器中右键添加CMD

管理员权限:
1.将以下代码拷贝入文件(和上面代码已做区分),将文件后缀名改成 “reg” (例: a.text 修改为 a.reg)
2.双击执行

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
"ShowBasedOnVelocityId"=dword:00639bc8
@="以管理员身份运行cmd"
"Icon"="C:\\WINDOWS\\system32\\cmd.exe"
​​
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

 

非管理员权限:
1.将以下代码拷贝入文件,将文件后缀名改成 “reg” (例: a.text 修改为 a.reg)
2.双击执行

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
@="在此处打开命令提示符"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd "%V""
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
@="在此处打开命令窗口"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere]
@="在此处打开命令窗口"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere]
@="在此处打开命令窗口"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""

  

posted @ 2020-09-14 15:32  少司命  阅读(276)  评论(0编辑  收藏  举报