转自:https://www.jianshu.com/p/b3b2989bc200
最近我下载了绿色版Notepad++,没有注册到右键菜单,只好自己动手。
方法一:
新建.reg注册文件,使用文本编辑器复制以下内容
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\NotePad++]
@="用&Notepad++打开"
"Icon"="C:\\Program Files (x86)\\Notepad++\\Notepad++.exe"
[HKEY_CLASSES_ROOT\*\shell\NotePad++\Command]
@="C:\\Program Files (x86)\\Notepad++\\Notepad++.exe \"%1\""
保存后双击文件运行即可。
方法二:Win + R
打开运行,输入regedit
回车打开注册表编辑器;
在HKEY_CLASSSES_ROOT/*/Shell
下新建项,命名为Open With Notepad++;
在该新建项的右边窗口新建字符串值(右键--新建--字符串值)。名称:Icon
;值:D:\program files (x86)\Notepad++\Notepad++.exe
【注:使用您自己的安装文件目录】;
在新建的项Open With Notepad++下面新建项Command(必须这个名称);
将刚新建的Command项右侧窗口的默认值,修改为:D:\program files (x86)\Notepad++\Notepad++.exe "%1"
【注:使用您自己的安装文件目录】,这样就大功告成了。
例子:
https://codeload.github.com/KinglyWayne/simg2img_win/zip/master
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\NotePad++]
@="simg2img转换为img"
"Icon"="E:\\java_tool\\simg2img_win-master\\simg2img.exe"
[HKEY_CLASSES_ROOT\*\shell\NotePad++\Command]
@="E:\\java_tool\\simg2img_win-master\\simg2img.exe \"%1\" \"%1.ext.img\""
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="E:\\Programs\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"E:\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"E:\\Programs\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
@="\"E:\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"E:\\Programs\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
@="\"E:\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""
E:\\Programs\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"E:\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"E:\\Programs\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
@="\"E:\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"E:\\Programs\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
@="\"E:\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""