wmic product where “description=’program name’ ” uninstall
Using the above syntax let’s uninstall some of the software installed on the local computer.wmic product where “description=’adobe acrobat reader DC’ ” uninstall
Output:
C:\Windows\system32>wmic product where “description=’adobe acrobat reader DC’ ” uninstall Executing (\\DESKTOP-SV9FF3Q\ROOT\CIMV2:Win32_Product.IdentifyingNumber=”{AC76BA86-7AD7-1033-7B44-AC0F074E4100}”,Name=”Adobe Acrobat Reader DC”,Version=”20.006.20034″)->Uninstall() Method execution successful. Out Parameters: instance of __PARAMETERS { ReturnValue = 0; };Here is the screenshot of the same execution from the command line.
wmic product where “description=’Java 7 Update 81 (64-bit)'” uninstall
Output: c:\>wmic product where “description=’Java 7 Update 81 (64-bit)'” uninstall Executing (\\mypc\ROOT\CIMV2:Win32_Product.IdentifyingNumber=”{34A24AE4-039D-4CA4-87B4-2F06417079FF}”,Name=”Java 7 Update 79 (64-bit)”,Version=”7.0.790″)->Uninstall() Method execution successful. Out Parameters: instance of __PARAMETERS { ReturnValue = 0; }; Like this, we can uninstall any software product that is installed on the local computer, all you need to find a description of the software product and execute as above. Note: Make sure you have all privileges to run these wmi commands, you may runinto issues if you don’t have sufficient privileges. Thank you for reading this article, if you have any questions please let us know. Thank you for visiting my site, for any scripts in these articles you are testing please make sure you have tested this script in our lower environment before you run in production.
Leave a Reply Cancel reply