如何在注册表中添加右键菜单?

如何给注册表添加右键菜单

  1. Win + R 组合键打开命令行
  2. 输入 regedit 打开注册表
  3. 找到 HKEY_CLASSES_ROOT*shell 目录,新建 name
  4. 来到 name 项目录,新建 command
  5. 来到 command 项目录,新建一个 字符串值
  6. 复制应用程序 *.exe 路径到 command 默认值 字符串值

name 层新建一个 icon 项,键值添加图标路径即可给右键菜单添加图标
eg.
D:20170901工作文档 otepad.6.9.2 otepad++.exe %1

Note:%1 前面是一个空格

如何在注册表中添加右键菜单

HKEY_LOCAL_MACHINESOFTWAREClasses*shell 文件右键菜单

HKEY_CLASSES_ROOTDirectoryBackgroundshell 桌面右键菜单

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt

HKEY_CLASSES_ROOT\Folder\shell

如何删除右键菜单中图形属性和图形选项

1.找到注册表 HKEY_CLASSES_ROOTDirectoryBackgroundshellexContextMenuHandlers 项。
删除
HKEY_CLASSES_ROOTDirectoryBackgroundshellexContextMenuHandlersigfxcui 项;
HKEY_CLASSES_ROOTDirectoryBackgroundshellexContextMenuHandlersigfxDTCM 项;
即可。

Note:如果后续想恢复该项,建议备份注册表。

如何在右键菜单中添加注册DLL选项

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTdllfileshell]

[HKEY_CLASSES_ROOTdllfileshell
egister]
@="注册DLL文件"

[HKEY_CLASSES_ROOTdllfileshell
egistercommand]
@="regsvr32 %1"

[HKEY_CLASSES_ROOTdllfileshellUnregister]
@="卸载DLL文件"

[HKEY_CLASSES_ROOTdllfileshellUnregistercommand]
@="regsvr32 /u %1"

一个在注册表中添加右键菜单的实例

//xxx.reg
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT*shell
otepad]
@="notepad open"

[HKEY_CLASSES_ROOT*shell
otepadcommand]
@="D:\20170901工作文档\notepad.6.9.2\notepad++.exe %1"
原文地址:https://www.cnblogs.com/cheungxiongwei/p/7541447.html