Python Tool Cleans Up Leftover File Associations from Uninstalled Windows Apps
Uninstalled or portable Windows applications often leave orphaned file-association entries in the registry, causing removed apps to still appear in 'Open with' menus. A Python script targeting HKEY_CLASSES_ROOT scans registered shell commands and identifies entries linked to a specified executable filename. The tool supports a --dry-run mode that previews matched registry keys without making any changes, allowing users to verify targets before deletion. It relies solely on Python standard-library modules — including winreg and ctypes — so no additional packages are required on any Python 3 Windows installation. Matching is case-insensitive and uses the Windows API function CommandLineToArgvW to accurately parse command strings and extract executable filenames.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in