If we forgot to right-click vscode when installing vscode, we can do it as follows:

C:\Users\renj03\AppData\Local\Programs\Microsoft VS Code\ code. exe is your vscode path

  • 1. Put the following code into a text document
  • 2. Modify the correct path and save the Settings
  • 3. Change the file to a. Reg file and click Run
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\VSCode] @="Open with Code" "Icon"="C:\Users\renj03\AppData\Local\Programs\Microsoft VS Code\Code.exe" [HKEY_CLASSES_ROOT\*\shell\VSCode\command] @="\"C:\\Users\\renj03\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\"" Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\VSCode] @="Open with Code" "Icon"="C:\\Users\\renj03\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe" [HKEY_CLASSES_ROOT\Directory\shell\VSCode\command] @="\"C:\\Users\\renj03\\AppData\\Local\\Programs\\Microsoft VS Exe \" \"%V\"" Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode] @="Open with Code" "Icon"="C:\\Users\\renj03\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe" [HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command] @="\"C:\\Users\\renj03\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""Copy the code