Skip to main content

windowsctxmenu

Get your Windows right-click menu exactly the way you want it, from Python.

The idea: you write one script with your setup (what to remove, what to add, what to block) and carry it to every new PC or every reinstall. Run it and your context menu is identical everywhere — no manual registry editing.

Requirements

  • Windows 11
  • Python >= 3.10

Installation

pip install windowsctxmenu

API

from windowsctxmenu import (
    add_shell, add_handler, unblock,
    remove_shell, remove_handler, remove_shellnew, block,
)
Function What it does
add_shell(name, command, ...) Add a classic verb under ...\shell
add_handler(name, clsid, ...) Add a COM handler
unblock(name_or_clsid) Unblock a blocked CLSID
remove_shell(name, ...) Remove a classic verb
remove_handler(name, ...) Remove a COM handler
remove_shellnew(key_path) Remove an entry from the "New" submenu
block(name_or_clsid) Block a built-in element by CLSID

scope: file, directory, background, folder, drive, allfiles, all, an extension (.zip), a ProgID glob (VLC.*), or sfa:<glob>.

Writing to HKLM (shared across users) requires running as administrator; otherwise the action is reported as no-permission and continues.

Examples

Everything is in the examples/ folder:

Copy one, tweak it to taste, and that's your per-PC script.

switchmenu command

Toggle the right-click menu between the classic (Windows 10) and the new (Windows 11) one. Restarts Explorer to apply instantly. No administrator needed: everything lives under HKEY_CURRENT_USER.

switchmenu

Release files for windowsctxmenu 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for windowsctxmenu 1.0.0
File Size Uploaded
windowsctxmenu-1.0.0.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for windowsctxmenu 1.0.0
File Interpreter ABI Platform
windowsctxmenu-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.5 kB

Release files / windowsctxmenu-1.0.0.tar.gz

Download URL windowsctxmenu-1.0.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6e9b3341bc3d13f08e28bbee069fa9c3c5e5eb33e9b5f86bf6b2f9cbceba74cb
BLAKE2b-256 checksum
How to use checksums
4fa3232691e509f6e433aaa8d7fd28f00b9f149376592722fa74958a7d9949ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / windowsctxmenu-1.0.0-py3-none-any.whl

Download URL windowsctxmenu-1.0.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c04d96864716b58421b3bccb711b105da67000c52dea167fca7ed9af60d0054b
BLAKE2b-256 checksum
How to use checksums
0d554004dc9c34d4b47aef974745c9b86df5adeac62a78a9003acc7d8d241eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page