Uninstall by Wildcard using WMIC

article #1616, updated 5 days ago

So you have an administrative command line, and you want to run the uninstaller of all msiexec-installed items whose names start with PQ. Here’s how:

wmic product where "name like 'PQ%'" call uninstall /nointeractive

If you wanted to run the uninstaller for everything with PQRST anywhere in its name, a double wildcard works too:

wmic product where "name like '%PQRST%'" call uninstall /nointeractive

Categories: