wking's blog

  • 文章分类
    • 日常随笔
    • IT技术
    • 系统封装
    • 大航海时代
  • 关于博主
GOD'S IN HIS HEAVEN, ALL'S RIGHT WITH THE WORLD.
  1. 首页
  2. IT技术
  3. 正文

EmEditor 恢复右键菜单批处理

2025-05-27 11点热度 0人点赞 0条评论

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

但EmEditor的右键菜单却是一个使用频率非常高的功能,并且“在文件夹中搜索”这个功能我也很需要。

所以花了两个小时时间,从注册表中找出来EmEditor修改的注册表,然后做成了添加和删除右键菜单的批处理文件,分享给大家。自己复制代码另存为批处理文件(需为gb2312字符集文件)后即可使用。

添加右键菜单批处理(需放到EmEditor程序所在目录运行)
PowerShell
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
删除右键菜单批处理(任意位置皆可运行)
PowerShell
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
EmEditor修改的原始注册表
Microsoft Registry
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\""
本作品采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2025-05-27

wking

不管博客型博主

点赞
< 上一篇

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

标签聚合
大航海时代 wordpress 一支红杏 C++ win10 linux R6300V2 OneNote

COPYRIGHT © 2024 wkings.blog. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang