现在网上的EmEditor绿色版,都没有附带EmEditor右键菜单管理工具。而且EmEditor这软件除非通过官方安装包安装,否则绿色版是无法在软件设置中添加右键上下文菜单,十分离谱。

但EmEditor的右键菜单却是一个使用频率非常高的功能,并且“在文件夹中搜索”这个功能我也很需要。
所以花了两个小时时间,从注册表中找出来EmEditor修改的注册表,然后做成了添加和删除右键菜单的批处理文件,分享给大家。自己复制代码另存为批处理文件(需为gb2312字符集文件)后即可使用。
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 | @REM 将此批处理文件放到Emeditor.exe所在目录运行 @set emeditor_path=%~dp0 @REM 此行命令无效 set /p emeditor_path=输入EmEditor.exe所在目录: @REM 添加空白处右键菜单 reg add HKCR\Directory\Background\shell\EmEditor /t REG_SZ /d "用 EmEditor 在文件中查找" /f reg add HKCR\Directory\Background\shell\EmEditor /v "Icon" /t REG_SZ /d "%emeditor_path%\emedres.dll,-128" /f reg add HKCR\Directory\Background\shell\EmEditor\command /t REG_SZ /d "\"%emeditor_path%\emeditor.exe\" /fd %V" /f reg add HKCU\SOFTWARE\Classes\Directory\Background\shell\EmEditor /t REG_SZ /d "用 EmEditor 在文件中查找" /f reg add HKCU\SOFTWARE\Classes\Directory\Background\shell\EmEditor /v "Icon" /t REG_SZ /d "%emeditor_path%\emedres.dll,-128" /f reg add HKCU\SOFTWARE\Classes\Directory\Background\shell\EmEditor\command /t REG_SZ /d "\"%emeditor_path%\emeditor.exe\" /fd %V" /f @REM 添加目录右键菜单 reg add HKCR\Directory\Directory\shell\EmEditor /t REG_SZ /d "用 EmEditor 在文件中查找" /f reg add HKCR\Directory\Directory\shell\EmEditor /v "Icon" /t REG_SZ /d "%emeditor_path%\emedres.dll,-128" /f reg add HKCR\Directory\Directory\shell\EmEditor\command /t REG_SZ /d "\"%emeditor_path%\emeditor.exe\" /fd %%1" /f reg add HKCU\SOFTWARE\Classes\Directory\shell\EmEditor /t REG_SZ /d "用 EmEditor 在文件中查找" /f reg add HKCU\SOFTWARE\Classes\Directory\shell\EmEditor /v "Icon" /t REG_SZ /d "%emeditor_path%\emedres.dll,-128" /f reg add HKCU\SOFTWARE\Classes\Directory\shell\EmEditor\command /t REG_SZ /d "\"%emeditor_path%\emeditor.exe\" /fd %%1" /f @REM 添加盘符右键菜单 reg add HKCR\Drive\shell\EmEditor /t REG_SZ /d "用 EmEditor 在文件中查找" /f reg add HKCR\Drive\shell\EmEditor /v "Icon" /t REG_SZ /d "%emeditor_path%\emedres.dll,-128" /f reg add HKCR\Drive\shell\EmEditor\command /t REG_SZ /d "\"%emeditor_path%\emeditor.exe\" /fd %V" /f reg add HKCU\SOFTWARE\Classes\Drive\shell\EmEditor /t REG_SZ /d "用 EmEditor 在文件中查找" /f reg add HKCU\SOFTWARE\Classes\Drive\shell\EmEditor /v "Icon" /t REG_SZ /d "%emeditor_path%\emedres.dll,-128" /f reg add HKCU\SOFTWARE\Classes\Drive\shell\EmEditor\command /t REG_SZ /d "\"%emeditor_path%\emeditor.exe\" /fd %V" /f @REM 添加文件右键菜单 reg add HKCR\*\shell\EmEditor /v "Icon" /t REG_SZ /d "%emeditor_path%\emedres.dll,-128" /f reg add HKCR\*\shell\EmEditor\command /t REG_SZ /d "\"%emeditor_path%\emeditor.exe\" \"%%1\"" /f reg add HKCR\SOFTWARE\Classes\*\shell\EmEditor /v "Icon" /t REG_SZ /d "%emeditor_path%\emedres.dll,-128" /f reg add HKCR\SOFTWARE\Classes\*\shell\EmEditor\command /t REG_SZ /d "\"%emeditor_path%\emeditor.exe\" \"%%1\"" /f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | @REM 此批处理文件可在任意位置执行 @REM 删除空白处右键菜单 reg delete HKCR\Directory\Background\shell\EmEditor /f reg delete HKCU\SOFTWARE\Classes\Directory\Background\shell\EmEditor /f @REM 删除目录右键菜单 reg delete HKCR\Directory\Directory\shell\EmEditor /f reg delete HKCU\SOFTWARE\Classes\Directory\shell\EmEditor /f @REM 删除盘符右键菜单 reg delete HKCR\Drive\shell\EmEditor /f reg delete HKCU\SOFTWARE\Classes\Drive\shell\EmEditor /f @REM 删除文件夹右键菜单 reg delete HKCR\*\shell\EmEditor /f reg delete HKCR\SOFTWARE\Classes\*\shell\EmEditor /f |
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 | Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\EmEditor] @="用 EmEditor 在文件中查找" "Icon"="C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emedres.dll,-128" [HKEY_CLASSES_ROOT\Directory\Background\shell\EmEditor\command] @="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emeditor.exe\" /fd %V" [HKEY_CLASSES_ROOT\Directory\shell\EmEditor] @="用 EmEditor 在文件中查找" "Icon"="C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emedres.dll,-128" [HKEY_CLASSES_ROOT\Directory\shell\EmEditor\command] @="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emeditor.exe\" /fd %1" [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\EmEditor] @="用 EmEditor 在文件中查找" "Icon"="C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emedres.dll,-128" [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\EmEditor\command] @="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emeditor.exe\" /fd %V" [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\EmEditor] @="用 EmEditor 在文件中查找" "Icon"="C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emedres.dll,-128" [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\EmEditor\command] @="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emeditor.exe\" /fd %1" [HKEY_CLASSES_ROOT\Drive\shell\EmEditor] @="用 EmEditor 在文件中查找" "Icon"="C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emedres.dll,-128" [HKEY_CLASSES_ROOT\Drive\shell\EmEditor\command] @="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emeditor.exe\" /fd %V" [HKEY_CURRENT_USER\SOFTWARE\Classes\Drive\shell\EmEditor] @="用 EmEditor 在文件中查找" "Icon"="C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emedres.dll,-128" [HKEY_CURRENT_USER\SOFTWARE\Classes\Drive\shell\EmEditor\command] @="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emeditor.exe\" /fd %V" [HKEY_CLASSES_ROOT\*\shell\EmEditor] "Icon"="C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emedres.dll,-128" [HKEY_CLASSES_ROOT\*\shell\EmEditor\command] @="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emeditor.exe\" \"%1\"" [HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\EmEditor] "Icon"="C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emedres.dll,-128" [HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\EmEditor\command] @="\"C:\\Users\\Administrator\\AppData\\Local\\Programs\\EmEditor\\emeditor.exe\" \"%1\"" |
文章评论