A small command-line tool that adds custom entries to the Windows File Explorer context menu.
ContextForge supports two different menu backends:
win10– classic shell menu. Entries are written to the current user's registry (HKCU\Software\Classes\...\shell), so they work on Windows 10 (and on Windows 11 in the legacy menu).win11– the modern Windows 11 context menu. Entries are stored in a JSON config file and exposed through a COMIExplorerCommandhandler that is packaged as a lightweight MSIX/AppX package.
Each entry has a label, a program, and a list of arguments. The arguments may contain %1,
%2, ... %9 placeholders, which are replaced with the paths of the selected files/folders when
the entry is invoked. The program and every argument are quoted automatically when the command is
stored, so you do not have to add quotes yourself.
- Windows 10 1809+ / Windows 11
- CMake 3.16 or newer
- A C++20 compiler — Clang/LLVM 17+ targeting MSVC, i.e. the official
clang+llvm-*-x86_64-pc-windows-msvcWindows release, together with the Visual Studio C++ build tools and the Windows SDK (the project uses C++/WinRT headers and MSVC-specific linker pragmas, so MinGW-based toolchains such as LLVM-MinGW or MSYS2'sclangare not supported) - Ninja
- Git
Make sure cmake, ninja, clang++ and git are available on your PATH.
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++
cmake --build build --parallel 4The -DCMAKE_CXX_COMPILER=clang++ is only needed if another compiler (e.g. GCC or MSVC) is also on
your PATH; CMake otherwise picks it up automatically.
The build produces two artifacts in the bin/ directory:
contextforge.exe– the command-line toolcontextforge.dll– the COM server used by the Windows 11 menu
AppxManifest.xml and logo.png are copied into bin/ automatically, so the folder is ready to be
registered as an AppX package.
Equivalent commands are available as VS Code tasks (
configureandbuild) in.vscode/tasks.json.
The win11 mode needs a one-time package registration so that File Explorer can load the COM
server. This step requires Developer Mode:
-
Open Settings → System → For developers and turn on Developer Mode.
-
Open PowerShell in the
bin/directory (whereAppxManifest.xmlwas copied) and run:Add-AppxPackage -Register .\AppxManifest.xml
-
You can turn Developer Mode off again once the command has finished.
If the package is not installed, the tool prints these instructions for you.
The package is registered under the publisher ContextForge, so you can look it up and see its
Name with:
Get-AppxPackage -Publisher *ContextForge*To remove it, unregister it directly by the Name (the Identity name from AppxManifest.xml):
Get-AppxPackage -Name d585db51-2e03-4e89-9b4c-080885988226 | Remove-AppxPackageOr filter by publisher and remove it in a single step:
Get-AppxPackage -Publisher *ContextForge* | Remove-AppxPackageEither way this removes the Windows 11 context menu from File Explorer.
Developer Mode is not required to uninstall. win11_menu.json is left untouched — delete it
manually if you also want to discard your saved entries.
Add an entry — --mode, --label, --program and --args are all required:
# Windows 11 modern menu
.\bin\contextforge.exe add --mode win11 --label "Open in VS Code" --program "code" --args "%1"
# Classic shell menu
.\bin\contextforge.exe add --mode win10 --label "Open in VS Code" --program "code" --args "%1"--args takes one or more values; each value becomes one argument of the program. The values may
contain %1, %2, ... placeholders, which are replaced with the paths of the selected
files/folders. Pass one value per placeholder:
.\bin\contextforge.exe add --mode win10 --label "this is a label" --program "path/to/program.exe" --args "%1" "%2"If the program lives somewhere other than your PATH, just pass its path — the tool adds the quotes
that end up in the stored command, so you only need the shell-level quoting PowerShell requires for
values containing spaces:
.\bin\contextforge.exe add --mode win11 --label "Open in Program" --program "D:\Program Files\program\program.exe" --args "%1"List all entries of a mode:
.\bin\contextforge.exe list --mode win11Remove an entry by its name:
.\bin\contextforge.exe remove --mode win11 --name ContextForge_xxxxxxxxadd generates a unique name (ContextForge_ plus a random suffix); use list to obtain the exact
name before removing.
| Subcommand | Option | Description |
|---|---|---|
add |
--mode, -m |
Menu backend: win10 or win11 |
add |
--label |
Text shown in the context menu |
add |
--program |
Program to run (quoted automatically) |
add |
--args |
One or more arguments for the program (supports %1 ... %9) |
remove |
--mode, -m |
Menu backend: win10 or win11 |
remove |
--name |
Entry name as returned by list |
list |
--mode, -m |
Menu backend: win10 or win11 |
win10entries live directly in the registry underHKCU\Software\Classes\*\shell.win11entries are stored inwin11_menu.jsonnext to the executable (created on first use). The packagedcontextforge.dllimplementsIExplorerCommand;EnumSubCommandsreads the JSON file and builds one submenu item per entry, replacing the placeholders inargswith the selected paths before launchingprogram.
See LICENSE.