-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremove.py
More file actions
52 lines (44 loc) · 1.59 KB
/
Copy pathremove.py
File metadata and controls
52 lines (44 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from windowsctxmenu import block, remove_handler, remove_shell, remove_shellnew
# Windows / drivers (HKLM -> admin)
remove_handler("NvCplDesktopContext", scope="background")
remove_shell("3D Print", scope=".3mf")
remove_handler("EPP")
remove_handler("Sharing")
remove_handler("Library Location", scope="folder")
remove_handler("SendTo", scope="allfiles")
remove_handler("Restore previous versions")
remove_shell("pintohomefile")
# Block by CLSID (restart Explorer afterwards)
block("Edit with Photos")
block("Share")
block("Edit in Notepad")
# 'Cast to Device' (PlayTo) everywhere it registers
remove_handler("PlayTo", scope="sfa:*")
remove_handler("PlayTo", scope="Stack.*")
# 'Set as desktop background' on image files
for ext in [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tif", ".tiff",
".heic", ".webp", ".dib", ".jfif"]:
remove_shell("setdesktopwallpaper", scope=ext)
# 'Print' verb everywhere
remove_shell("print", scope="*")
remove_shell("print", scope="sfa:*")
# 'New' submenu: prune everything except New Folder
for kp in [".contact", ".gdoc", ".gsheet", ".gslides",
".library-ms", ".lnk", ".zip\\CompressedFolder"]:
remove_shellnew(kp)
# User apps
for name in [
"WinDirStat",
"Open with Code",
"Add to VLC media player's Playlist",
"Play with VLC media player",
"Open Git Ba&sh here",
"Open Git &GUI here",
"Add to MPC-HC Playlist",
"Play with MPC-HC",
"Send with Tailscale...",
]:
remove_shell(name)
# VLC verbs across all its per-extension ProgIDs
remove_shell("AddToPlaylistVLC", scope="VLC.*")
remove_shell("PlayWithVLC", scope="VLC.*")