Win + R
組合鍵打開命令行- 輸入
regedit
打開註冊表 - 找到
HKEY_CLASSES_ROOT\*\shell
目錄,新建name
項 - 來到
name
項目錄,新建command
項 - 來到
command
項目錄,新建一個字符串值
- 複製應用程序
*.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