Win10--在右键菜单中添加cmd.exe(在此处打开CMD窗口)

原文网址:Win10--在右键菜单中添加cmd.exe(在此处打开CMD窗口)_IT利刃出鞘的博客-CSDN博客

简介

说明

        本文介绍Windows10如何在右键菜单中添加cmd.exe(在此处打开CMD窗口)。

需求描述

        在某个目录下时,想直接打开CMD.exe,然后自动进入当前的路径,这样可以提高速度。

方法介绍

        新建文本文档,将下边内容复制进去,保存为ANSI格式,文件名后缀改为.reg,双击运行此reg即可。(必须是ANSI格式,否则汉字乱码)。

备注

其实右键添加cmd.exe没必要的。可以直接在文件夹路径里输入cmd然后回车。

以管理员方式打开cmd.exe

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Directory\shell\runas]
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="在此处打开CMD窗口"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

[-HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="在此处打开CMD窗口"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

[-HKEY_CLASSES_ROOT\Drive\shell\runas]
[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="在此处打开CMD窗口"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

普通权限的方式打开cmd.exe

Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\cmd_here]
@="在该处打开CMD窗口"
"Icon"="cmd.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\cmd_here\command]
@="\"C:\\Windows\\System32\\cmd.exe\""
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\cmd_here]
@="在该处开CMD窗口"
"Icon"="cmd.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\cmd_here\command]
@="\"C:\\Windows\\System32\\cmd.exe\""
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmdPrompt]
@="在该处打开CMD窗口"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmdPrompt\command]
@="\"C:\\Windows\\System32\\cmd.exe\" \"cd %1\""

猜你喜欢

转载自blog.csdn.net/feiying0canglang/article/details/124983435