Created
January 21, 2017 20:35
-
-
Save cgddrd/307417540e4f07b220eb10cc1b1a6217 to your computer and use it in GitHub Desktop.
Performs silent uninstall of an MSI application via product key lookup from supplied application name wildcard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem Uninstall MSI application via Product-Key GUID Lookup. | |
rem Modified from original source: http://stackoverflow.com/q/30790561 | |
rem Extract Product Key GUID for provided product name wildcard ('%%b'), before performing silent uninstall. | |
for /f "skip=1 delims=" %%a in ( | |
'wmic product where "Name like '%%INSERT_PRODUCT_NAME_WILDCARD%%'" get identifyingnumber' | |
) do @for /f "delims=" %%b in ("%%a") do msiexec /x %%b /qb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment