新建bat文件,编码格式为utf-8内容如下
1 echo off 2 chcp 65001 3 reg add "HKEY_CLASSES_ROOT\*\shell\rcmd" /ve /d 控制台 /f 4 reg add "HKEY_CLASSES_ROOT\*\shell\rcmd" /v "Icon" /d "cmd.exe" /t "REG_SZ" /f 5 reg add "HKEY_CLASSES_ROOT\*\shell\rcmd\command" /ve /d "cmd /s /k \"pushd E:\\desktop\"" /f 6 reg add "HKEY_CLASSES_ROOT\Folder\shell\rcmd" /ve /d 控制台 /f 7 reg add "HKEY_CLASSES_ROOT\Folder\shell\rcmd" /v "Icon" /d "cmd.exe" /t "REG_SZ" /f 8 reg add "HKEY_CLASSES_ROOT\Folder\shell\rcmd\command" /ve /d "cmd /s /k pushd \"%%V"" /f 9 reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\rcmd" /ve /d 控制台 /f 10 reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\rcmd" /v "Icon" /d "cmd.exe" /t "REG_SZ" /f 11 reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\rcmd\command" /ve /d "cmd /s /k pushd \"%%V"" /f
执行bat,邮件菜单就会出现控制台菜单项
标签:shell,win,add,CLASSES,右键,HKEY,控制台,ROOT,reg From: https://www.cnblogs.com/simon-xie/p/16771199.html