源码:
@echo off
title 添加在此处打开命令行右键
echo 删除"PyCharm"右键
reg delete HKCR\Directory\Background\shell\PyCharm /f 1>nul 2>nul
echo 删除"Visual Studio"右键
reg delete HKCR\Directory\Background\shell\AnyCode /f 1>nul 2>nul
echo 添加在"此处打开命令行"右键
reg add HKCR\Directory\Background\shell\在此处打开命令行\command\ /t REG_SZ /d "cmd.exe /s /k pushd ""%%V""" /f 1>nul
set /p=allend.
平常命令行用得多,又很不习惯PyCharm和Visual Studio的打开命令行右键,打开速度奇慢无比,容易卡顿,还不如自己和win7一样右键打开cmd快。
这个bat附带了删除PyCharm和Visual Studio的"命令行右键"功能,不需要可以删除这一段代码就好:
echo 删除"PyCharm"右键
reg delete HKCR\Directory\Background\shell\PyCharm /f 1>nul 2>nul
echo 删除"Visual Studio"右键
reg delete HKCR\Directory\Background\shell\AnyCode /f 1>nul 2>nul