右键cmdshell
@echo off
color 3f
title 右键MS-DOS设置 by 忆暮童子
:menu
cls
echo.
echo [1] 添加右键打开MS-DOS
echo [2] 删除右键打开MS-DOS
echo [0] 退出
set /p choice= 请选择(1-2-0):
if "%choice%"=="1" goto add
if "%choice%"=="2" goto remove
if "%choice%"=="0" goto end
goto menu
:add
reg add "HKCR\*\shell\MS-DOS" /ve /d MS-DOS /f >nul 2>nul
reg add "HKCR\*\shell\MS-DOS\command" /ve /d "cmd.exe" /f >nul 2>nul
reg add "HKCR\Folder\shell\MS-DOS" /ve /d MS-DOS /f >nul 2>nul
reg add "HKCR\Folder\shell\MS-DOS\command" /ve /d "cmd.exe /k cd %%1" /f >nul 2>nul
cls
echo 操作成功,按任意键返回……
pause>nul
goto menu
:remove
reg delete "HKCR\*\shell\MS-DOS" /f >nul 2>nul
reg delete "HKCR\Folder\shell\MS-DOS" /f >nul 2>nul
cls
echo 操作成功,按任意键返回……
pause>nul
goto menu
:end
cls
echo -----------------------------------------------------
echo 操作完毕,谢谢您的使用!
echo.
echo by 忆暮童子
echo hi.baidu.com/szxgwp
echo.
echo 按任意键退出...
echo -----------------------------------------------------
pause>nul
color 3f
title 右键MS-DOS设置 by 忆暮童子
:menu
cls
echo.
echo [1] 添加右键打开MS-DOS
echo [2] 删除右键打开MS-DOS
echo [0] 退出
set /p choice= 请选择(1-2-0):
if "%choice%"=="1" goto add
if "%choice%"=="2" goto remove
if "%choice%"=="0" goto end
goto menu
:add
reg add "HKCR\*\shell\MS-DOS" /ve /d MS-DOS /f >nul 2>nul
reg add "HKCR\*\shell\MS-DOS\command" /ve /d "cmd.exe" /f >nul 2>nul
reg add "HKCR\Folder\shell\MS-DOS" /ve /d MS-DOS /f >nul 2>nul
reg add "HKCR\Folder\shell\MS-DOS\command" /ve /d "cmd.exe /k cd %%1" /f >nul 2>nul
cls
echo 操作成功,按任意键返回……
pause>nul
goto menu
:remove
reg delete "HKCR\*\shell\MS-DOS" /f >nul 2>nul
reg delete "HKCR\Folder\shell\MS-DOS" /f >nul 2>nul
cls
echo 操作成功,按任意键返回……
pause>nul
goto menu
:end
cls
echo -----------------------------------------------------
echo 操作完毕,谢谢您的使用!
echo.
echo by 忆暮童子
echo hi.baidu.com/szxgwp
echo.
echo 按任意键退出...
echo -----------------------------------------------------
pause>nul