---
title: Add "Open in Claude Code" to Windows 11 right-click menu
title_en: Add "Open in Claude Code" to Windows 11 right-click menu
description: Step-by-step guide for adding an "Open in Claude Code" entry to the Windows 11 right-click menu, via either a custom context menu app or the registry.
sidebar_label: Claude Code context menu
---

# Adding "Open in Claude Code" to the Windows 11 right-click menu

## Overview

Two ways to add an **Open in Claude Code** entry to the Windows 11 right-click menu, so you can launch the Claude Code CLI in any folder with one click.

- **Option A** (recommended): use the Custom Context Menu app — the entry shows up in the **new Windows 11 context menu**.
- **Option B**: use the Windows registry (`.reg` file) — the entry shows up in the **legacy context menu** (accessible via 「顯示更多選項」 / "Show more options", or `Shift + right-click`).

### Prerequisites

- Windows 11
- Claude Code CLI installed, with `claude` available in PATH
- Claude Code executable at `%USERPROFILE%\.local\bin\claude.exe`

---

## Option A: Custom Context Menu (new-style menu)

The Windows 11 new-style context menu cannot be extended via the registry alone, so a third-party app is needed: [ContextMenuForWindows11](https://github.com/ikas-mc/ContextMenuForWindows11) (open source, LGPL-3.0).

### Step 1: install Custom Context Menu

#### Option 1: Microsoft Store (paid, around $1 USD)

Search for **Custom Context Menu** in the Microsoft Store and install. Paying supports the developer; functionality is identical to the free version.

#### Option 2: GitHub release (free)

1. Go to the [Releases page](https://github.com/ikas-mc/ContextMenuForWindows11/releases) and download **ContextMenuCustom-CMC_GITHUB_RELEASE-x64.zip** (x64 architecture).

2. Unzip — the directory looks like this:

   ```
   ContextMenuCustomGithubPackage_x.x.x.xx_Test/
   ├── ContextMenuCustomGithubPackage_x.x.x.xx_x64.cer      ← certificate
   ├── ContextMenuCustomGithubPackage_x.x.x.xx_x64.msixbundle  ← installer
   └── Dependencies/
       └── x64/
           ├── Microsoft.NET.Native.Framework.2.2.appx
           ├── Microsoft.NET.Native.Runtime.2.2.appx
           ├── Microsoft.UI.Xaml.2.8.appx
           ├── Microsoft.VCLibs.x64.14.00.appx
           └── Microsoft.VCLibs.x64.14.00.Desktop.appx
   ```

3. **Install the certificate** (open PowerShell as Administrator):

   ```powershell
   Import-Certificate -FilePath ".\ContextMenuCustomGithubPackage_x.x.x.xx_x64.cer" -CertStoreLocation Cert:\LocalMachine\Root
   ```

   > **Note:** the certificate must be installed under `Cert:\LocalMachine\Root` (Trusted Root Certification Authorities). Installing it under `Trusted People` or `CurrentUser` causes the subsequent msixbundle install to fail with `0x800B0109`.

4. **Install the app**:

   ```powershell
   Add-AppPackage -Path ".\ContextMenuCustomGithubPackage_x.x.x.xx_x64.msixbundle"
   ```

   Dependencies are installed automatically.

### Step 2: add the Open in Claude Code menu entry

#### Option 1: via the app GUI

1. Open **Custom Context Menu** (search in the Start menu).
2. Click the **+** on the left to add a new entry.
3. Fill in the following:

   | Field | Value |
   |---|---|
   | Title | `Open in Claude Code` |
   | Exe | `cmd.exe` |
   | Param | `/c cd /d "{path}" && claude` |
   | Icon | `%USERPROFILE%\.local\bin\claude.exe` |
   | Match Folder | enabled |
   | Match File | disabled |

4. Click **Save**.

#### Option 2: drop in a JSON config file

1. In the app, click the **folder icon** in the top-left to open the config directory (`%LOCALAPPDATA%\Packages\{appId}\LocalState\custom_commands\`).

2. Create `Open in Claude Code.json` in that directory:

   ```json
   {
     "title": "Open in Claude Code",
     "exe": "cmd.exe",
     "param": "/c cd /d \"{path}\" && claude",
     "icon": "%USERPROFILE%\\.local\\bin\\claude.exe",
     "acceptExts": "",
     "acceptDirectory": true,
     "acceptDirectoryFlag": 0,
     "acceptFile": false,
     "acceptMultipleFilesFlag": 0,
     "pathDelimiter": "",
     "paramForMultipleFiles": "",
     "index": 0
   }
   ```

### Step 3: make it visible

- If the app has caching enabled, click **Toggle Cache** to refresh.
- Restart **Windows Explorer** from Task Manager, or sign out and back in.
- Right-click any folder — **Open in Claude Code** should now appear in the new-style menu.

> **Note:** the entry appears under the Custom Context Menu submenu (default name "Custom Context Menu"). The root entry name can be changed in the app's settings.

---

## Option B: Registry (legacy menu)

This writes the entry directly into the Windows registry via a `.reg` file. It appears in the legacy menu (accessible via "Show more options" / `Shift + right-click`).

### Install

Create `add-claude-code-context-menu.reg`:

```reg
Windows Registry Editor Version 5.00

; --- Right-click on a FOLDER ---
[HKEY_CURRENT_USER\Software\Classes\Directory\shell\ClaudeCode]
@="Open in Claude Code"
"Icon"="%USERPROFILE%\\.local\\bin\\claude.exe"

[HKEY_CURRENT_USER\Software\Classes\Directory\shell\ClaudeCode\command]
@="cmd.exe /c cd /d \"%V\" && claude"

; --- Right-click on directory BACKGROUND (empty space inside a folder) ---
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\ClaudeCode]
@="Open in Claude Code"
"Icon"="%USERPROFILE%\\.local\\bin\\claude.exe"

[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\ClaudeCode\command]
@="cmd.exe /c cd /d \"%V\" && claude"
```

Double-click the `.reg` file and confirm the merge. This covers both cases:

- Right-click **on a folder itself** → Open in Claude Code
- Right-click on **empty space inside a folder** → Open in Claude Code

No reboot needed — newly opened Explorer windows pick it up immediately.

### Remove

Create `remove-claude-code-context-menu.reg`:

```reg
Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Classes\Directory\shell\ClaudeCode]
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\ClaudeCode]
```

Double-click to remove.

### Optional: disable the new-style menu and use only the legacy menu

If you'd rather have right-click show the full legacy menu directly (so Option B's entry is visible without an extra click), run:

```powershell
reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
```

Restart Explorer to apply. To restore the new-style menu:

```powershell
reg delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f
```

---

## Comparison

| | Option A (Custom Context Menu) | Option B (Registry) |
|---|---|---|
| Where it appears | Windows 11 new-style menu | Legacy menu (Show more options) |
| Install effort | Requires a third-party app | Double-click a `.reg` file |
| Customizability | High (GUI + JSON config) | Low (manual registry edits) |
| Removal | Delete in app, or remove JSON | Run the uninstall `.reg` |
| Dependencies | Custom Context Menu app | None |

Both options can be used **at the same time** without conflicts.
