1. Click the right mouse button anywhere on the desktop or folder to open VSCode
-
Press
win+R
the key combination to run the command window, enterregedit
to open the registry editor.
-
If the path is found
计算机\HKEY_CLASSES_ROOT\Directory\Background\shell
,VSCode文件夹(项)
if the path has not been set before, you generally need to create this folder (item) by yourself, or you can choose another alias.
-
Double-click on the right
默认
to fill in the numerical data使用VSCode打开
(mainly to set the name displayed in the right-click menu, the name can be customized or not set, and it will be displayed by the name of the created file (item) by default). -
Click the VSCode folder (item)—right mouse button—new—string value—name it Icon, this step is mainly to set the icon before the right button displays the text, and then set the path of the software (icon).
-
Click the VSCode folder (item)—right mouse button—New—item, and name it
Command
.
-
Double-click the path where the default setting software is located on the right, and add it later
"%v"
, if not, add"%1"
(English double quotation marks).
-
Setup succeeded.
2. Right click on the folder to open VSCode
1. Find 计算机\HKEY_CLASSES_ROOT\Directory\shell
and create a new VSCode文件夹(项)
2. Double-click 默认
to set the value data as: 使用VScode打开
3. Click the VSCode folder (item)—right mouse button—New—String Value—name it icon, and 设置vscode的安装路径
.
4. Click the VSCode folder (item)—right mouse button—New—item, and name it Command
.
5. The setting is successful.
Reference link: https://blog.csdn.net/weixin_47638941/article/details/120781121