Just installed Visual Studio Code 1.1.1 on a Windows 7 machine. When I right-click on a folder, \"Open With Code\" does not appear.
If you prefer using the keyboard more than the mouse. This solution is for you...
Type the following commands in your file explorer (location).
Open a project
vscode://file/{full path to project}/
vscode://file/c:/myProject/
vscode:// --opens vscode for current directory
Open a file
vscode://file/{full path to file}
vscode://file/c:/myProject/package.json
Open a file to line and column
vscode://file/{full path to file}:line:column
vscode://file/c:/myProject/package.json:5:10
Source: https://code.visualstudio.com/docs/editor/command-line
Example:
These settings are normally stored per-user for VS Code.
To set for a new user account: re-run the installer.
my vscode installed here:
C:\Users\saber\AppData\Local\Programs\Microsoft VS Code\code.exe
should replace SABER with your pc username
so the script is s.th like this:
save this content as .reg script file with first line with : Windows Registry Editor Version 5.00
then run it :
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Users\\saber\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Users\\saber\\AppData\\Local\\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"="\"C:\\Users\\saber\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
@="\"C:\\Users\\saber\\AppData\\Local\\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"="\"C:\\Users\\saber\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
@="\"C:\\Users\\saber\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""
add visual studio code to right click folder in windows
replace the \\saber\\
with \\YOUR_PC_USER_NAME\\
try to find out the Microsoft vs Code files it is some time in the default location and sometimes it is in C:\Users\PAPPU KUMAR\AppData\Local\Programs\Microsoft VS Code.
and then add it to the vscode.reg(create one) files.
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Users\\PAPPU KUMAR\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Users\\PAPPU KUMAR\\AppData\\Local\\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"="\"C:\\Users\\PAPPU KUMAR\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
@="\"C:\\Users\\PAPPU KUMAR\\AppData\\Local\\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"="\"C:\\Users\\PAPPU KUMAR\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
@="\"C:\\Users\\PAPPU KUMAR\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""