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.
- Open Registry Editor: Press
Win + R, typeregedit, and hit Enter. - Navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths - Create Key: Right-click App Paths > New > Key. Name it
code.exe. - Set Executable: Double-click the (Default) value and set it to:
C:\Users\%USERPROFILE%\AppData\Local\Programs\Microsoft VS Code\Code.exe - 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 CodeNote: replace "%USERPROFILE%" with the actual username as regedit prefers absolute paths.
This fix addresses the underlying issues discussed here:
- Extensionless file conflict: microsoft/vscode#79638
- Address bar execution issues: microsoft/vscode#198851
*Note: This also works for other VS code based editors like AntiGravity