“Open with Code” is added by the Visual Studio Code installer when you tick its two Explorer context menu options, and on Windows 11 it is installed as a small packaged component rather than a plain registry key, which is why registry guides often fail to remove it. Uninstalling VS Code removes it, but if you want to keep the editor and lose the menu entry, ContextCleaner from Automata Labs shows the entry, tells you which app or package added it, and hides it with an automatic backup you can undo in one click.
Keep VS Code, lose the menu entry, and undo it any time.
Get it from Microsoft
Where does “Open with Code” come from?
It comes from two optional checkboxes in the VS Code setup wizard. The installer’s own text strings, published in the VS Code source repository on GitHub, read:
- Add “Open with Code” action to Windows Explorer file context menu
- Add “Open with Code” action to Windows Explorer directory context menu
Both are listed in the VS Code setup script with the flag unchecked, so they are off unless you tick them. Many people tick them during a first install and forget, or inherit them on a work PC.
What happens next depends on your version of Windows. We read the current setup script on 21 October 2026, and it does two different things:
| Your setup | How the entry is added | Where it appears |
|---|---|---|
| Windows 11 with the normal menu | A packaged Explorer command, registered with Add-AppxPackage, plus a title value in the registry | The compact Windows 11 menu |
| Windows 11 with the classic menu forced on | Classic shell keys in the registry | The full classic menu |
| Windows 10 | Classic shell keys in the registry | The classic menu |
The script decides this with a function that checks whether you are on Windows 11 and whether you have forced the old menu back with the well-known CLSID key {86ca1aa0-34aa-4e8b-a509-50c905bae2a2} under HKEY_CURRENT_USER. If that key exists, it installs the classic version instead.
Why don’t registry guides remove it on Windows 11?
Most “remove Open with Code” guides tell you to delete keys under Software\Classes\*\shell and Software\Classes\Directory\shell. On Windows 10, that matches what the installer writes. On Windows 11 with the default menu, the setup script installs a packaged component for the entry, and when it does, it also deletes the old classic keys. So there may be nothing under *\shell to delete, yet the item is still in your menu.
The Windows 11 compact menu can show entries from packaged apps, and those are registered differently from classic commands. If you want the background, our guide to a context menu item that is not in the registry explains how packaged entries work and why they hide from the usual tools.
Will unticking the option in the installer remove it?
Not reliably. Re-running setup and unticking the boxes is common advice, but the setup script we read writes the entries when the boxes are ticked and removes them when VS Code is uninstalled. It does not clearly remove them just because you untick a box on a later install. The supported built-in route is:
- Uninstall Visual Studio Code from Settings, Apps, Installed apps.
- Reinstall it with both “Open with Code” boxes unticked.
The uninstall step is reliable because the setup script removes its packaged component and deletes its menu keys during uninstall. It is also heavy-handed if all you wanted was a shorter menu.
How do I remove it manually from the registry on Windows 10?
If you are on Windows 10, or on Windows 11 with the classic menu forced on, the entry lives in ordinary registry keys. The setup script writes them under HKEY_CURRENT_USER for the User installer and HKEY_LOCAL_MACHINE for the System installer, in these locations:
Software\Classes\*\shell\<VS Code key> (files)
Software\Classes\directory\shell\<VS Code key> (folders)
Software\Classes\directory\background\shell\<VS Code key> (folder background)
Software\Classes\Drive\shell\<VS Code key> (drives)
On most stable installs the key is named VSCode. Before you delete anything, export each key from Registry Editor so you can restore it. Then restart Explorer or sign out and back in. If you also have VS Code Insiders installed, it adds its own separate entry.
This works, but you are editing four or eight keys by hand, with no undo except the exports you remembered to make.
What is the safer way to hide “Open with Code”?
ContextCleaner was built for exactly this kind of entry. According to its Microsoft Store listing:
- It finds every right-click entry across all four Windows menu surfaces in one list, including the Windows 11 modern menu and the classic “Show more options” list.
- It shows which app, DLL, or package added each entry, and which file types it affects, so you can see that the item belongs to VS Code before you touch it.
- Hide the clutter: turn off entries you never use in both the short Windows 11 menu and the longer list.
- Pin to the top: move the items you use most to the front of the menu instead.
- Safe by design: an automatic backup before every change, one-click restore from any earlier snapshot, and undo and redo that remember your history even after you reopen the app.
- A clear confirmation before anything is written, and friendly warnings before you switch off a built-in Windows component.
- Private by default: no third-party tracking, and a change history that stays on your machine.
- Keyboard-friendly, with a Ctrl+K command palette.
It runs on Windows 11, and its listing says it “works great on Windows 10 (22H2) too.”
Find the Open with Code entry, see that VS Code owns it, and switch it off with a backup.
Get it from Microsoft
Which method should I use?
| Method | Keeps VS Code | Works on the Windows 11 modern menu | Undo |
|---|---|---|---|
| Uninstall, reinstall with boxes unticked | Yes, after reinstalling | Yes | Reinstall with boxes ticked |
| Re-run setup and untick the boxes | Yes | Not reliably | Re-run setup |
| Delete registry keys by hand | Yes | No, if the packaged entry is in use | Only if you exported the keys |
| ContextCleaner | Yes | Yes | One-click restore and undo history |
A practical approach for most people:
- Decide whether you want it gone or just moved. Many developers use “Open with Code” on folders but not on files. ContextCleaner lets you keep one and hide the other.
- Open ContextCleaner and search for “Code”. Check the source column to confirm the entry belongs to Visual Studio Code.
- Hide it, confirm the change, and right-click a file and a folder to check.
- If an update brings it back, check the list again. Updates can re-register entries, and your history shows exactly what you changed before.
The same steps work for similar developer entries. We cover another common one in removing Git Bash Here from the context menu.
Frequently asked questions
Why does “Open with Code” appear twice?
VS Code has separate options for files and for folders, so you may see the entry in both places. If you also have VS Code Insiders installed, it adds its own entry too.
Is it safe to remove “Open with Code”?
Yes. It is a shortcut for opening a file or folder in VS Code. Removing it does not affect the editor itself, and you can still open folders from inside VS Code.
Why is there nothing under shell in the registry on Windows 11?
On Windows 11 with the default menu, the VS Code setup script installs the entry as a packaged component and deletes the old classic keys, so the registry route does not find it.
Will a VS Code update bring it back?
It can. Updates rerun setup steps. If it returns, hide it again; ContextCleaner’s history shows what you changed before.
Do I need to restart my PC?
Usually not. Restarting Explorer or signing out is normally enough for menu changes to show.
Try ContextCleaner
Get ContextCleaner from the Microsoft Store. It is a one-time purchase with no subscription, and the Store listing shows the current price.
For more on taming the menu, read Show more options in Windows 11 and shell extensions that slow down right-click.
A tidy right-click menu, with every change backed up and reversible.
Get it from Microsoft
Microsoft, Windows and Visual Studio Code are trademarks of the Microsoft group of companies. ContextCleaner is not affiliated with or endorsed by Microsoft.
Last updated 21 October 2026. Published by Automata Labs, a software company in Canada.