Skip to content

Instantly share code, notes, and snippets.

@rupeshknn
Created March 3, 2026 20:35
Show Gist options
  • Select an option

  • Save rupeshknn/a8037176f01004fd7faa86a64bce2a03 to your computer and use it in GitHub Desktop.

Select an option

Save rupeshknn/a8037176f01004fd7faa86a64bce2a03 to your computer and use it in GitHub Desktop.
Fix: VS Code "code ." Shortcut in Windows File Explorer

The Problem

If typing code . in your Windows File Explorer address bar opens a Shell file or triggers a Bing search or an annoying conhost window, this guide provides a permanent, silent fix.

We can tell Windows to map the word code directly to the Code.exe GUI. This is silent and takes priority over PATH scripts.

Step-by-Step Instructions

  1. Open Registry Editor: Press Win + R, type regedit, and hit Enter.
  2. Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
  3. Create Key: Right-click App Paths > New > Key. Name it code.exe.
  4. Set Executable: Double-click the (Default) value and set it to: C:\Users\%USERPROFILE%\AppData\Local\Programs\Microsoft VS Code\Code.exe
  5. Set Path: Right-click in the right pane > New > String Value. Name it Path. Set it to: C:\Users\%USERPROFILE%\AppData\Local\Programs\Microsoft VS Code Note: replace "%USERPROFILE%" with the actual username as regedit prefers absolute paths.

Related Issues & Context

This fix addresses the underlying issues discussed here:

*Note: This also works for other VS code based editors like AntiGravity

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