如何在 Windows 10 中添加或删除命令提示符在此处打开上下文菜单

CMD 命令提示符是在“命令提示符”窗口中输入计算机命令的入口点。通过在命令提示符下键入命令,可以在计算机上执行任务,而无需使用 Windows 图形界面。本教程大眼仔旭(www.dayanzai.me)将向您展示如何为 Windows 10 中的所有用户在文件资源管理器中添加或删除命令提示符“此处打开”和“以管理员身份打开”上下文菜单。

如何在 Windows 10 中添加或删除命令提示符在此处打开上下文菜单

如何在 Windows 10 中添加或删除命令提示符在此处打开上下文菜单

注意:您必须以管理员身份登录才能添加或删除命令提示符“在此处打开”上下文菜单。

右键单击文件夹或驱动器时,以及右键单击文件夹,驱动器,库背景或桌面的背景时,命令提示符“在此处打开”上下文菜单将可用。

添加命令提示符“在此处打开”上下文菜单

复制以下注册表值,新建空白文本粘贴并保存。修改 .txt 后缀为 .reg 格式,然后双击导入注册表。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT/DesktopBackground/shell/CommandPrompt]
"Icon"="imageres.dll,-5323"
"MUIVerb"="命令提示符"
"Extended"=-
"SubCommands"=""

[HKEY_CLASSES_ROOT/DesktopBackground/shell/CommandPrompt/shell/cmd1]
@="@shell32.dll,-8506"
"MUIVerb"="在此处打开"
"Icon"="imageres.dll,-5323"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT/DesktopBackground/shell/CommandPrompt/shell/cmd1/command]
@="cmd.exe /s /k pushd "%V""

[HKEY_CLASSES_ROOT/DesktopBackground/shell/CommandPrompt/shell/cmd2]
@="以管理员身份在此处打开"
"HasLUAShield"=""
"Icon"="imageres.dll,-5324"

[HKEY_CLASSES_ROOT/DesktopBackground/shell/CommandPrompt/shell/cmd2/command]
@="cmd /c echo|set/p="%V"|powershell -NoP -W 1 -NonI -NoL "SaPs 'cmd' -Args '/c """cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe"""' -Verb RunAs""

[HKEY_CLASSES_ROOT/Directory/shell/CommandPrompt]
"Icon"="imageres.dll,-5323"
"MUIVerb"="命令提示符"
"Extended"=-
"SubCommands"=""

[HKEY_CLASSES_ROOT/Directory/shell/CommandPrompt/shell/cmd1]
@="@shell32.dll,-8506"
"MUIVerb"="在此处打开"
"Icon"="imageres.dll,-5323"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT/Directory/shell/CommandPrompt/shell/cmd1/command]
@="cmd.exe /s /k pushd "%V""

[HKEY_CLASSES_ROOT/Directory/shell/CommandPrompt/shell/cmd2]
@="以管理员身份在此处打开"
"HasLUAShield"=""
"Icon"="imageres.dll,-5324"

[HKEY_CLASSES_ROOT/Directory/shell/CommandPrompt/shell/cmd2/command]
@="cmd /c echo|set/p="%L"|powershell -NoP -W 1 -NonI -NoL "SaPs 'cmd' -Args '/c """cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe"""' -Verb RunAs""

[HKEY_CLASSES_ROOT/Directory/Background/shell/CommandPrompt]
"Icon"="imageres.dll,-5323"
"MUIVerb"="命令提示符"
"Extended"=-
"SubCommands"=""

[HKEY_CLASSES_ROOT/Directory/Background/shell/CommandPrompt/shell/cmd1]
@="@shell32.dll,-8506"
"MUIVerb"="在此处打开"
"Icon"="imageres.dll,-5323"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT/Directory/Background/shell/CommandPrompt/shell/cmd1/command]
@="cmd.exe /s /k pushd "%V""

[HKEY_CLASSES_ROOT/Directory/Background/shell/CommandPrompt/shell/cmd2]
@="以管理员身份在此处打开"
"HasLUAShield"=""
"Icon"="imageres.dll,-5324"

[HKEY_CLASSES_ROOT/Directory/Background/shell/CommandPrompt/shell/cmd2/command]
@="cmd /c echo|set/p="%V"|powershell -NoP -W 1 -NonI -NoL "SaPs 'cmd' -Args '/c """cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe"""' -Verb RunAs""

[HKEY_CLASSES_ROOT/Drive/shell/CommandPrompt]
"Icon"="imageres.dll,-5323"
"MUIVerb"="命令提示符"
"Extended"=-
"SubCommands"=""

[HKEY_CLASSES_ROOT/Drive/shell/CommandPrompt/shell/cmd1]
@="@shell32.dll,-8506"
"MUIVerb"="在此处打开"
"Icon"="imageres.dll,-5323"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT/Drive/shell/CommandPrompt/shell/cmd1/command]
@="cmd.exe /s /k pushd "%V""

[HKEY_CLASSES_ROOT/Drive/shell/CommandPrompt/shell/cmd2]
@="以管理员身份在此处打开"
"HasLUAShield"=""
"Icon"="imageres.dll,-5324"

[HKEY_CLASSES_ROOT/Drive/shell/CommandPrompt/shell/cmd2/command]
@="cmd /c echo|set/p="%L"|powershell -NoP -W 1 -NonI -NoL "SaPs 'cmd' -Args '/c """cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe"""' -Verb RunAs""

[-HKEY_CLASSES_ROOT/LibraryFolder/Background/shell/CommandPrompt]

添加命令提示符 Shift + 右键单击“在此处打开”上下文菜单

复制以下注册表值,新建空白文本粘贴并保存。修改 .txt 后缀为 .reg 格式,然后双击导入注册表。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT/DesktopBackground/shell/CommandPrompt]
"Icon"="imageres.dll,-5323"
"MUIVerb"="命令提示符"
"Extended"=""
"SubCommands"=""

[HKEY_CLASSES_ROOT/DesktopBackground/shell/CommandPrompt/shell/cmd1]
@="@shell32.dll,-8506"
"MUIVerb"="在此处打开"
"Icon"="imageres.dll,-5323"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT/DesktopBackground/shell/CommandPrompt/shell/cmd1/command]
@="cmd.exe /s /k pushd "%V""

[HKEY_CLASSES_ROOT/DesktopBackground/shell/CommandPrompt/shell/cmd2]
@="以管理员身份在此处打开"
"HasLUAShield"=""
"Icon"="imageres.dll,-5324"

[HKEY_CLASSES_ROOT/DesktopBackground/shell/CommandPrompt/shell/cmd2/command]
@="cmd /c echo|set/p="%V"|powershell -NoP -W 1 -NonI -NoL "SaPs 'cmd' -Args '/c """cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe"""' -Verb RunAs""

[HKEY_CLASSES_ROOT/Directory/shell/CommandPrompt]
"Icon"="imageres.dll,-5323"
"MUIVerb"="命令提示符"
"Extended"=""
"SubCommands"=""

[HKEY_CLASSES_ROOT/Directory/shell/CommandPrompt/shell/cmd1]
@="@shell32.dll,-8506"
"MUIVerb"="在此处打开"
"Icon"="imageres.dll,-5323"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT/Directory/shell/CommandPrompt/shell/cmd1/command]
@="cmd.exe /s /k pushd "%V""

[HKEY_CLASSES_ROOT/Directory/shell/CommandPrompt/shell/cmd2]
@="以管理员身份在此处打开"
"HasLUAShield"=""
"Icon"="imageres.dll,-5324"

[HKEY_CLASSES_ROOT/Directory/shell/CommandPrompt/shell/cmd2/command]
@="cmd /c echo|set/p="%L"|powershell -NoP -W 1 -NonI -NoL "SaPs 'cmd' -Args '/c """cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe"""' -Verb RunAs""

[HKEY_CLASSES_ROOT/Directory/Background/shell/CommandPrompt]
"Icon"="imageres.dll,-5323"
"MUIVerb"="命令提示符"
"Extended"=""
"SubCommands"=""

[HKEY_CLASSES_ROOT/Directory/Background/shell/CommandPrompt/shell/cmd1]
@="@shell32.dll,-8506"
"MUIVerb"="在此处打开"
"Icon"="imageres.dll,-5323"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT/Directory/Background/shell/CommandPrompt/shell/cmd1/command]
@="cmd.exe /s /k pushd "%V""

[HKEY_CLASSES_ROOT/Directory/Background/shell/CommandPrompt/shell/cmd2]
@="以管理员身份在此处打开"
"HasLUAShield"=""
"Icon"="imageres.dll,-5324"

[HKEY_CLASSES_ROOT/Directory/Background/shell/CommandPrompt/shell/cmd2/command]
@="cmd /c echo|set/p="%V"|powershell -NoP -W 1 -NonI -NoL "SaPs 'cmd' -Args '/c """cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe"""' -Verb RunAs""

[HKEY_CLASSES_ROOT/Drive/shell/CommandPrompt]
"Icon"="imageres.dll,-5323"
"MUIVerb"="命令提示符"
"Extended"=""
"SubCommands"=""

[HKEY_CLASSES_ROOT/Drive/shell/CommandPrompt/shell/cmd1]
@="@shell32.dll,-8506"
"MUIVerb"="在此处打开"
"Icon"="imageres.dll,-5323"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT/Drive/shell/CommandPrompt/shell/cmd1/command]
@="cmd.exe /s /k pushd "%V""

[HKEY_CLASSES_ROOT/Drive/shell/CommandPrompt/shell/cmd2]
@="以管理员身份在此处打开"
"HasLUAShield"=""
"Icon"="imageres.dll,-5324"

[HKEY_CLASSES_ROOT/Drive/shell/CommandPrompt/shell/cmd2/command]
@="cmd /c echo|set/p="%L"|powershell -NoP -W 1 -NonI -NoL "SaPs 'cmd' -Args '/c """cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe"""' -Verb RunAs""

[-HKEY_CLASSES_ROOT/LibraryFolder/Background/shell/CommandPrompt]

删除“在此处打开”上下文菜单命令提示符

复制以下注册表值,新建空白文本粘贴并保存。修改 .txt 后缀为 .reg 格式,然后双击导入注册表。

1
2
3
4
5
6
7
8
9
10
11
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT/DesktopBackground/shell/CommandPrompt]

[-HKEY_CLASSES_ROOT/Directory/shell/CommandPrompt]

[-HKEY_CLASSES_ROOT/Directory/Background/shell/CommandPrompt]

[-HKEY_CLASSES_ROOT/Drive/shell/CommandPrompt]

[-HKEY_CLASSES_ROOT/LibraryFolder/Background/shell/CommandPrompt]

这是一个很方便快捷的功能,如果您有经常要使用 CMD 命令提示符,那么这个小修改或许能提高您的工作效率。

原创文章,作者:kirin,如若转载,请注明出处:https://blog.ytso.com/213924.html

(0)
上一篇 2021年12月20日
下一篇 2021年12月20日

相关推荐

发表回复

登录后才能评论