文件夹中的右键菜单
在注册表编辑器中定位到:HKEY_CLASSES_ROOT\Directory\Background\shell
,在其下新建项,
例如: 在目录C:\Users\CharleeChan\AppData\Local\Microsoft\Windows\WinX\Group3
下,有10 - Programs and Features.lnk
程序与功能,右键打开,找到其目标,该目标即为卸载程序的命令.
命令为:%windir%\system32\control.exe /name Microsoft.ProgramsAndFeatures
则相应的.reg文件为:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\Programs And Features]
"Icon"="control.exe"
@="Unistall Programs"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Programs And Features\command]
@="control.exe /name Microsoft.ProgramsAndFeatures"
文件上的右键菜单
- 示例1:把Notepad3添加进右键菜单
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Edit with Notepad3]
"Icon"="D:\\Program\\Notepad3\\Notepad3.exe"
@="使用Notepad3编辑"
[HKEY_CLASSES_ROOT\*\shell\Edit with Notepad3\command]
@="\"D:\\Program\\Notepad3\\Notepad3.exe\" \"%1\""
- 示例2: 把Paint.Net添加到右键菜单
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Edit with Paint.net]
"Icon"="D:\\Program\\paint.net\\PaintDotNet.exe"
@="使用Paint.Net编辑"
[HKEY_CLASSES_ROOT\*\shell\Edit with Paint.net\command]
@="\"D:\\Program\\paint.net\\PaintDotNet.exe\" \"%1\""
将txt文件的默认双击打开设置为Notepad3
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\txtfile\shell\open\command]
@="\"D:\\Program\\Notepad3\\Notepad3.exe\" \"%1\""