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

原文鏈接:https://www.cnblogs.com/cheungxiongwei/p/7541447.html
  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"

轉載:https://www.cnblogs.com/cheungxiongwei/p/7541447.html

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章