Mar
24
2016
鼠标右键添加用Notepad2打开
注册表添加
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\notepad] @="用 Notepad2 打开" [HKEY_CLASSES_ROOT\*\shell\notepad\command] @="D:\\Program Files\\Notepad2\\Notepad2.exe \"%1\""
bat脚本版
@echo off TITLE 自动为Notepad2增加鼠标右键菜单的打开选项 cls echo 可按需要修改执行文件变量即可,目录路径会自动获取 echo 自动生卸载文件,方便不用的时候可以清除加入的注册表内容 rem TheExe为右键要加的执行文件,以NotePad2为例 rem TheMenu为加到右键的显示内容,以NotePad2为例 rem TheU为生成删除批处理的文件名,一般不用改 set TheExe=Notepad2.exe set TheMenu=notepad set TheText=用NotePad2打开 set TheU=删除右键.bat reg add HKCR\*\Shell\%TheMenu%\ /ve /t REG_SZ /d "%TheText%" /f >nul reg add HKCR\*\Shell\%TheMenu%\Command /ve /t REG_SZ /d "\"%cd%\%TheExe%\" %%1" /f >nul echo 操作完成 echo 开始生成删除右键批处理 echo @echo off >%TheU% echo cls >>%TheU% echo color 0B >>%TheU% echo reg delete HKCR\*\Shell\%TheMenu% /f >>%TheU%
最活跃的读者