Vscode: Right-click not showing "open with VS Code"

Created on 3 Feb 2018  路  20Comments  路  Source: microsoft/vscode

  • VSCode Version: Code 1.19.3 (7c4205b5c6e52a53b81c69d2b2dc8a627abaa0ba, 2018-01-25T10:36:43.673Z)
  • OS Version: Windows_NT ia32 10.0.16299

    - Extensions: none

Steps to Reproduce:

  1. Install VSCode (64-bit or 32-bit, both have same issue)
  2. Ensure the relevant items are checked in the install dialogue
  3. Right-click

Expected result:

  • Context menu should show "Open with Code"

Actual result:

  • The item isn't there

I've also tried suggested registry settings without luck (tried both "Program Files" and "Program Files (x86)":

Windows Registry Editor Version 5.00
; Open files
[HKEY_LOCAL_MACHINE\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe,0"
[HKEY_LOCAL_MACHINE\*\shell\Open with VS Code\command]
@="\"C:\\Program Files (x86)\\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_LOCAL_MACHINE\Directory\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0"
[HKEY_LOCAL_MACHINE\Directory\shell\vscode\command]
@="\"C:\\Program Files (x86)\\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_LOCAL_MACHINE\Directory\Background\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0"
[HKEY_LOCAL_MACHINE\Directory\Background\shell\vscode\command]
@="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%V\""
bug install-update

Most helpful comment

During the latest update (to 1.26.1), I followed the recommendation to remove the system wide install, and run with the User install. I did not have the windows explorer context menu items anymore, and also did not have the registry settings mentioned above.

Today, I re-ran the user installer, and everything looks good again - without needing to reboot.

I'm running Windows 10 1703 (OS Build 15063.1266) if that helps.

All 20 comments

I know it sounds funny... but did you restart your machine?

Several times! Wierdly the "Open with Code" does appear on my work machine. Could this happen if I didn't check the appropriate boxes on the original install (I don't remember if I did or not)?

BTW: I even tried un-install/re-install of both 64-bit and 32-bit versions.

Ah, I tried both HKCR and HKLM but not HKCU - I'll give that a try when I get home tonight and let you know if it works.

Thanks for your input.

The setup has a checkbox to set the Open with VS Code menu item. Didn't you check that?

I did. It works if you're logged-in as an admin, but not otherwise.

Oh I see. Yeah that's pretty rough. We need to clean this up.

Thanks. I'll wait for the fix to land 馃憤

Hmmm, I looked at the registry at home (after uninstalling and re-installing v1.20.0) and I do have all the keys you mentioned above, but still no right-mouse-click options!

Any update on this? I just did a clean install of 1.22.1 (uninstall 1.21, restart, install 1.22.1) and I still don't have the menu items :-(

Not sure if this will help but I've just realised that even after: complete uninstall, remove anything that has "VS Code" or "Code.exe" from registry, reboot, fresh install, when I start VSCode I still see all my settings / extensions / open files - is that expected?

Hi this script is works for me. But I saw the icon of VSCode is missing.

Does anyone know how to fix the issue for missing icon on menu context for VSCode? Thanks for your help!

fix_but_missing_icon

Okay, I got the point why my icon is missing. The root cause is the incorrect file path for VSCode that I register into Windows Registry. It's my mistake only. This script is correct and works.

Can't vscode add a button to do this ? it would be good for portable version.

This is still not working. I am running version 1.26.1

During the latest update (to 1.26.1), I followed the recommendation to remove the system wide install, and run with the User install. I did not have the windows explorer context menu items anymore, and also did not have the registry settings mentioned above.

Today, I re-ran the user installer, and everything looks good again - without needing to reboot.

I'm running Windows 10 1703 (OS Build 15063.1266) if that helps.

Did the same thing as @testworksau and got the same result. Context item gone for files and folders.

image

Just reinstalled it and saw it was my mistake for not seeing the options that are now present in the installer:
image

Reinstalling did the trick! I don't recall the options as shown in @damadei screenshot when I initially installed via the VSCodeUserSetup. Reinstalling did it though. Thank you all!

Thanks guys - this works for me 馃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  234Comments

filfat picture filfat  路  246Comments

Tyriar picture Tyriar  路  314Comments

Tekbr picture Tekbr  路  191Comments

ozsay picture ozsay  路  247Comments