给文件夹添加右键VScode/Typora打开

1. 新建一个.txt文件

2. 修改内容为:

Windows Registry Editor Version 5.00 

; Open files 
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code] 
@="Edit with VS Code" 
"Icon"="D:\\Microsoft VS Code\\Code.exe,0" 

[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command] 
@="\"D:\\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 with VSCode" 
"Icon"="\"D:\\Microsoft VS Code\\Code.exe\",0" 

[HKEY_CLASSES_ROOT\Directory\shell\vscode\command] 
@="\"D:\\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 with VSCode" 
"Icon"="\"D:\\Microsoft VS Code\\Code.exe\",0" 

[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command] 
@="\"D:\\Microsoft VS Code\\Code.exe\" \"%V\""
D:\\Microsoft VS Code\\Code.exe,0" 

[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command] 
@="\"D:\\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 with VSCode" 
"Icon"="\"D:\\Microsoft VS Code\\Code.exe\",0" 

[HKEY_CLASSES_ROOT\Directory\shell\vscode\command] 
@="\"D:\\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 with VSCode" 
"Icon"="\"D:\\Microsoft VS Code\\Code.exe\",0" 

[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command] 
@="\"D:\\Microsoft VS Code\\Code.exe\" \"%V\""

3. 将其中的路径改为对应软件的路径, 修改名字比如open with vscode--->open with xxx

4.保存,修改后缀为 .reg, 双击成功.

参考:https://www.cnblogs.com/zmdblog/p/10202193.html

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容