Step 1: Open Run and Access the Registry Editor
Step 2: Navigate to the Following Directory in the Registry Editor
Computer\HKEY_CLASSES_ROOT\Directory\Background\shell
Step 3: Create a New Key
Setting Up the Name and Icon of the Shortcut:
Command:
Create a new key in your directory and set the "(Default)" value to the command.
This is not a question but rather a guide on how to add the "Open with Visual Studio Code" option to the right-click menu.
For those who are new to the Registry Editor, here's an additional note for Step 3:
(Default)
key to open a popup.If you're entering "Open with Visual Studio Code," that's fine. However, if you're entering a path, remember to wrap your path in double quotes, as shown in the example above.
For instance, my icon value is:
"C:\Users\PACKARD BELL\AppData\Local\Programs\Microsoft VS Code\Code.exe"
And my command value in the command
key is:
"C:\Users\PACKARD BELL\AppData\Local\Programs\Microsoft VS Code\Code.exe" .
Notice that with the command
value here, we have the path wrapped in double quotes, as well as white space and a dot wrapped in double quotes.
If you not want/know edit regedit code, you can create/download file with extension .reg . Link for template .zip Content this file:
Windows Registry Editor Version 5.00
; Add "Open with Code" to the context menu for files/directory/directory background/drive.
[HKEY_CLASSES_ROOT\*\shell\VSCode]
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe"
@="Open w&ith Code"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open w&ith Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open w&ith Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""
[HKEY_CLASSES_ROOT\Drive\shell\VSCode]
@="Open w&ith Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Drive\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""
You need change Path to installed VSC on your PC...Example for first lines:
[HKEY_CLASSES_ROOT\*\shell\VSCode]
"Icon"="D:\\Soft\\Microsoft VS Code\\Code.exe"
@="Open w&ith Code"
You need launch this file with .reg extension and Agree change registry.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With