Skip to content

Instantly share code, notes, and snippets.

View leidegre's full-sized avatar

John Leidegren leidegre

View GitHub Profile
@leidegre
leidegre / uninstall.py
Last active November 4, 2023 08:36
Uninstall a bunch of apps by invoking the UninstallString for apps matching DisplayName (passed on command line)
# requires python 3.6 or later
# run as elevated user (requires admin permission for reg delete)
# python uninstall.py "<DisplayName>"
# you will get to confirm matching apps before any uninstall takes place
import sys
import winreg
import subprocess
def get_matching_apps(filter_string):