Skip to content

Instantly share code, notes, and snippets.

@thegtproject
Last active November 13, 2025 12:36
Show Gist options
  • Select an option

  • Save thegtproject/89952de19292f18db55b7ec2b26dadab to your computer and use it in GitHub Desktop.

Select an option

Save thegtproject/89952de19292f18db55b7ec2b26dadab to your computer and use it in GitHub Desktop.
Add "Open with Code" to Windows 11 explorer context menu

This is a copy of a github discussion in case it is deleted or otherwise unavailable for some reason and because I find myself having to do this often and I always forget where to find this post. Original Post

Get latest release of vscode-explorer-command:

https://github.com/microsoft/vscode-explorer-command/releases/

Extract contents to C:\Users\<username>\AppData\Local\Programs\Microsoft VS Code\shell

Note: If `shell` folder is not present, create it.

Extract contents of code_insiders_explorer_x64.appx into the same directory with 7zip

Your file tree should look like:

<vscode_install_path>
|-bin/
|-...
|-shell/
| |-[Content_Types].xml
| |-AppxBlockMap.xml
| |-AppxManifest.xml
| |-code_explorer_command.dll
| L-code_explorer_x64.appx
|-...
|-Code.exe
L-...

Open <vscode_install_path>/shell/AppxManifest.xml with a text editor, find and edit this line:

Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"

Replace the two Microsoft Corporation with anything you like. For example:

Publisher="CN=The GT Corporation, O=The GT Corporation, L=Redmond, S=Washington, C=US"

This is because Windows will prevent you from installing unsigned app published by Microsoft.

Do the following registry changes

1. Open Registry Editor (regedit.exe), under HKEY_CURRENT_USER\Software\Classes, create a key called VSCodeContextMenu

2. You may create the key under HKEY_LOCAL_MACHINE\Software\Classes instead, if you want to enable the context menu extension for other users as well

3. Under the newly created HKEY_CURRENT_USER\Software\Classes\VSCodeContextMenu, create a String Value. The Value name is Title. The Value data is Open with VSCode.

Enable Developer Mode from your windows setting (Settings > Privacy & security > For developers > Developer Mode)

So that we can install app from loose file.

Open a PowerShell window with admin privilege, go to <vscode_install_path>/shell/, run the following command and wait for it to complete

`Add-AppxPackage -Path "<vscode_install_path>/shell/AppxManifest.xml" -Register -ExternalLocation "<vscode_install_path>/shell/"`

You can turn off Developer Mode now, if you want.


To remove the installed context menu extension

run this PowerShell command in a privileged PS window to get the PackageFullName of the extension

Get-AppxPackage Microsoft.VSCode

Then run this command to remove the extension

Remove-AppxPackage <your_PackageFullName_obtained>

The Remove-AppxPackage command takes about a minute to finish (for me). You should restart File Explorer, remove the registry key and delete the <vscode_install_path>/shell/ folder after the command completes.

@SiskSjet

Copy link
Copy Markdown

Just FYI, the newer versions of vscode-explorer-command will not work with non-insider VS Code.
The 3.0.4 version is the last we can use for that: https://github.com/microsoft/vscode-explorer-command/releases/tag/3.0.4

For some reason they prevented that workaround in the commit.
microsoft/vscode-explorer-command@6cd644f#diff-4ff63e30c84e988984c4539579668870970df9f29295db103bc4a2698d6420e7R184-R187

I really don't know what they are doing. The Insider build has had this option built in for years now.
Sadly the original issue is closed, so I hope people trying the workaround find this gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment