Skip to content

Repository files navigation

Open in IntelliJ IDEA for Windows 11

A native Windows 11 IExplorerCommand shell extension that adds Open in IntelliJ IDEA directly to the modern File Explorer context menu when you right-click a folder.

Unlike classic registry-based context-menu entries, this command appears in the main Windows 11 right-click menu instead of Show more options.

Features

  • Adds Open in IntelliJ IDEA directly to the Windows 11 modern context menu.
  • Works when right-clicking one filesystem folder; hidden for multiple selections.
  • Launches the selected folder in IntelliJ IDEA.
  • Uses Microsoft's modern IExplorerCommand / File Explorer context-menu integration.
  • Native C++ COM shell extension.
  • Includes build, install, uninstall, and environment-verification PowerShell scripts.
  • Automatically supports the CMake generators Visual Studio 18 2026 and Visual Studio 17 2022.
  • Configurable IntelliJ IDEA executable path.

GitHub description

A native Windows 11 IExplorerCommand shell extension that adds "Open in IntelliJ IDEA" directly to the modern folder context menu.

Requirements

  • Windows 11 x64, build 22000 or newer.
  • IntelliJ IDEA installed.
  • Windows Developer Mode enabled.
  • CMake.
  • Visual Studio Build Tools 2022/2026 or Visual Studio with:
    • Desktop development with C++
    • MSVC Build Tools for x64/x86
    • Windows 11 SDK
    • C++ CMake tools for Windows

1. Configure IntelliJ IDEA path

Open config.ps1 and set the path to your idea64.exe.

Default configuration in this repository:

$IntelliJExe = "C:\Program Files\JetBrains\IntelliJ IDEA 2026.1.4\bin\idea64.exe"

Example for another version:

$IntelliJExe = "C:\Program Files\JetBrains\IntelliJ IDEA 2026.2\bin\idea64.exe"

2. Verify your computer before building

Open PowerShell in the repository folder:

Set-ExecutionPolicy -Scope Process Bypass
.\verify-environment.ps1

The verification script checks:

  • Windows 11 version.
  • 64-bit Windows.
  • IntelliJ IDEA executable path.
  • Windows Developer Mode.
  • CMake.
  • MSVC x64/x86 C++ build tools.
  • Windows SDK.
  • Supported Visual Studio CMake generator.
  • PowerShell execution policy.

Every failed check includes a suggested fix.

When everything is ready, you will see:

READY: all required checks passed.

3. Build

.\build.ps1

The build script uses vswhere to choose the newest installed C++ toolchain that also has a supported CMake generator:

  1. Visual Studio 18 2026
  2. Visual Studio 17 2022

It builds an x64 Release version, runs argument-quoting regression tests, and copies the resulting files into the Package folder.

A successful build ends with:

Build complete.
Next: run .\install.ps1

4. Install

.\install.ps1

The installer:

  1. Checks the configured executable and build outputs.
  2. Checks manifest XML syntax and GUID formatting (Windows validates the schema during registration).
  3. Registers the local AppX package without first removing an existing registration.
  4. Restarts File Explorer.

After installation, right-click a folder. You should see:

Open in IntelliJ IDEA

directly in the Windows 11 context menu.

5. Uninstall

.\uninstall.ps1

Developer Mode

Because this repository registers an unsigned local AppX package during development, Windows Developer Mode must be enabled.

Open:

Settings → System → For developers → Developer Mode

and turn it on.

If Developer Mode is disabled, Add-AppxPackage -Register may fail with an error similar to:

0x80073CFF
To install this application you need either a Windows developer license or a sideloading-enabled system.

Visual Studio Build Tools setup

Open Visual Studio Installer, choose Modify, and select:

Desktop development with C++

Make sure these components are enabled:

  • MSVC Build Tools for x64/x86
  • Windows 11 SDK
  • C++ CMake tools for Windows

Then open a new PowerShell window and verify:

cmake --version
cmake --help

Under CMake generators, you should see either:

Visual Studio 18 2026

or:

Visual Studio 17 2022

How it works

Windows 11's modern context menu does not treat a standard registry verb the same way as the older Explorer menu. Traditional entries such as:

HKEY_CLASSES_ROOT\Directory\shell

normally appear under Show more options.

This project instead uses a native COM DLL implementing IExplorerCommand.

The AppX manifest registers the COM server and associates its command with:

<desktop5:ItemType Type="Directory">

Explorer supplies the selected folder through IShellItemArray. The extension resolves the folder's filesystem path and launches:

idea64.exe "<selected-folder>"

Project structure

OpenInIntelliJ-Windows11/
├── .gitignore
├── CMakeLists.txt
├── README.md
├── config.ps1
├── toolchain.ps1
├── verify-environment.ps1
├── build.ps1
├── install.ps1
├── uninstall.ps1
├── Package/
│   ├── AppxManifest.xml
│   └── Assets/
│       ├── StoreLogo.png
│       ├── Square44x44Logo.png
│       └── Square150x150Logo.png
└── src/
    ├── ExplorerCommand.cpp
    ├── GeneratedConfig.h.in
    ├── IntelliJContextMenu.def
    └── Launcher.cpp

src/CommandLine.h handles Windows argument quoting. tests/CommandLineTests.cpp checks round trips through CommandLineToArgvW, including spaces, Unicode, UNC paths, and trailing backslashes. Run the tests after configuring and building:

ctest --test-dir build -C Release --output-on-failure

tests/ExplorerCommandTests.cpp also verifies that menu-state checks do not query shell-provider attributes or resolve filesystem paths. Folder validation runs only after clicking the command, keeping that work off the menu-opening path. The manifest limits the command to directories; multiple selections remain hidden. These tests do not measure Explorer's overall menu latency.

Registration failures stop installation without restarting Explorer or explicitly uninstalling the previous registration. If Windows reports the package is in use, close IntelliJ-related menu activity and retry; the installer does not forcibly remove a working registration to resolve deployment errors.

COM exports

The shell-extension DLL exports the standard COM entry points:

DllGetClassObject
DllCanUnloadNow

The .def file marks them as PRIVATE, which avoids unnecessary import-library warnings while keeping the functions exported for Explorer.

Troubleshooting

cmake is not recognized

Install CMake:

winget install Kitware.CMake

Close PowerShell, open a new window, and run:

cmake --version

CMake cannot find a Visual Studio generator

Open Visual Studio Installer and install Desktop development with C++.

Then run:

cmake --help

Confirm that Visual Studio 18 2026 or Visual Studio 17 2022 is listed.

IntelliJ path is wrong

Edit:

config.ps1

and set $IntelliJExe to your actual idea64.exe.

AppX registration fails with 0x80073CFF

Enable Windows Developer Mode:

Settings → System → For developers → Developer Mode

Installation succeeds but the command is not visible

The installer restarts Explorer automatically. If Explorer still shows cached shell state:

  1. Sign out of Windows.
  2. Sign back in.
  3. Right-click an actual folder again.

You can also verify that the package is registered:

Get-AppxPackage IntelliJContextMenu.Local |
    Format-List Name, PackageFullName, InstallLocation, Status

Updating IntelliJ IDEA

When IntelliJ IDEA is upgraded to a version installed in a different directory:

  1. Edit config.ps1.
  2. Run:
.\build.ps1
.\install.ps1

The IntelliJ path is compiled into the shell-extension DLL, so a rebuild is required after changing it.

Security notes

The extension only receives the selected folder path from Explorer and passes it to the configured IntelliJ IDEA executable. It does not require network access and does not modify the selected folder.

License

This project is licensed under the MIT License.

See the LICENSE file for details.

About

A native Windows 11 IExplorerCommand shell extension that adds "Open in IntelliJ IDEA" directly to the modern folder context menu.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages