Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right-click not showing "open with VS Code" #42889

Closed
simonl65 opened this issue Feb 3, 2018 · 20 comments
Closed

Right-click not showing "open with VS Code" #42889

simonl65 opened this issue Feb 3, 2018 · 20 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues
Milestone

Comments

@simonl65
Copy link

simonl65 commented Feb 3, 2018

  • VSCode Version: Code 1.19.3 (7c4205b, 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\""
@vscodebot vscodebot bot added the workbench-diagnostics General VS Code built-in diagnostic issues label Feb 3, 2018
@bpasero bpasero added install-update VS Code installation and upgrade system issues and removed workbench-diagnostics General VS Code built-in diagnostic issues labels Feb 3, 2018
@bpasero bpasero assigned joaomoreno and unassigned bpasero Feb 3, 2018
@joaomoreno
Copy link
Member

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

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Feb 5, 2018
@simonl65
Copy link
Author

simonl65 commented Feb 5, 2018

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.

@joaomoreno
Copy link
Member

@simonl65
Copy link
Author

simonl65 commented Feb 8, 2018

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.

@joaomoreno
Copy link
Member

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

@simonl65
Copy link
Author

simonl65 commented Feb 8, 2018

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

@joaomoreno
Copy link
Member

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

@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Feb 8, 2018
@joaomoreno joaomoreno added this to the Backlog milestone Feb 8, 2018
@simonl65
Copy link
Author

simonl65 commented Feb 8, 2018

Thanks. I'll wait for the fix to land 👍

@simonl65
Copy link
Author

simonl65 commented Feb 9, 2018

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!

@simonl65
Copy link
Author

simonl65 commented Apr 9, 2018

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 :-(

@simonl65
Copy link
Author

simonl65 commented Apr 9, 2018

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?

@blackie1019
Copy link

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

@blackie1019
Copy link

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.

@eromoe
Copy link

eromoe commented Jul 16, 2018

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

@jmino
Copy link

jmino commented Aug 17, 2018

This is still not working. I am running version 1.26.1

@testworksau
Copy link

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.

@damadei
Copy link

damadei commented Aug 23, 2018

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

image

@damadei
Copy link

damadei commented Aug 23, 2018

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

@jmino
Copy link

jmino commented Aug 23, 2018

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!

@simonl65
Copy link
Author

Thanks guys - this works for me 🥇

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues
Projects
None yet
Development

No branches or pull requests

8 participants