windows设置右键一键打开文件的配置

在安装软件时一般通过msi或者exe安装,这是一般会有提示绑定到鼠标右键,如果没有勾选则安装后就无法通过右键打开,这是需要把文件拖到快捷方式上面才可以使用该软件打开。

另外如何下载的是zip的压缩包源码格式根本没有设置的选项,那么该如何配置呢?

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT*shellVSCode]
@="Open with Code"
"Icon"="C:\softwares\vscode\Code.exe"

[HKEY_CLASSES_ROOT*shellVSCodecommand]
@=""C:\softwares\vscode\Code.exe" "%1""

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTDirectoryshellVSCode]
@="Open with Code"
"Icon"="C:\softwares\vscode\Code.exe"

[HKEY_CLASSES_ROOTDirectoryshellVSCodecommand]
@=""C:\softwares\vscode\Code.exe" "%V""

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTDirectoryBackgroundshellVSCode]
@="Open with Code"
"Icon"="C:\softwares\vscode\Code.exe"

[HKEY_CLASSES_ROOTDirectoryBackgroundshellVSCodecommand]
@=""C:\softwares\vscode\Code.exe" "%V""

复制上述代码,将代码中C:\softwares\vscode\Code.exe修改为本地的安装包的exe文件,用记事本保存后修改后缀为```reg``,如下图所示:

修改保存后变成一个注册表配置问价,双击运行。

点击确认后可以了,这时右键点击文件,就可以看到有vs code了,修改为notepad --的地址就将其也注册了。

经验分享 程序员 微信小程序 职场和发展