如何在注冊表中添加右鍵菜單?


如何給注冊表添加右鍵菜單

  1. Win + R 組合鍵打開命令行
  2. 輸入 regedit 打開注冊表
  3. 找到 HKEY_CLASSES_ROOT\*\shell 目錄,新建 name
  4. 來到 name 項目錄,新建 command
  5. 來到 command 項目錄,新建一個 字符串值
  6. 復制應用程序 *.exe 路徑到 command 默認值 字符串值

name 層新建一個 icon 項,鍵值添加圖標路徑即可給右鍵菜單添加圖標
eg.
D:\20170901工作文檔\notepad.6.9.2\notepad++.exe %1

Note:%1 前面是一個空格

如何在注冊表中添加右鍵菜單

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell 文件右鍵菜單

HKEY_CLASSES_ROOT\Directory\Background\shell 桌面右鍵菜單

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt

HKEY_CLASSES_ROOT\Folder\shell

如何刪除右鍵菜單中圖形屬性和圖形選項

1.找到注冊表 HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers 項。
刪除
HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\igfxcui 項;
HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\igfxDTCM 項;
即可。

Note:如果后續想恢復該項,建議備份注冊表。

如何在右鍵菜單中添加注冊DLL選項

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\dllfile\shell]

[HKEY_CLASSES_ROOT\dllfile\shell\register]
@="注冊DLL文件"

[HKEY_CLASSES_ROOT\dllfile\shell\register\command]
@="regsvr32 %1"

[HKEY_CLASSES_ROOT\dllfile\shell\Unregister]
@="卸載DLL文件"

[HKEY_CLASSES_ROOT\dllfile\shell\Unregister\command]
@="regsvr32 /u %1"

一個在注冊表中添加右鍵菜單的實例

//xxx.reg
Windows Registry Editor Version 5.00

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

[HKEY_CLASSES_ROOT\*\shell\notepad\command]
@="D:\\20170901工作文檔\\notepad.6.9.2\\notepad++.exe %1"


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM