I never knew anything about the Windows management instrumentation control (wmic) until now, but I will be sure to exploit it's features. Windows scripting sucks, and that's just the way it is. If you ran this outside of a batch file, you will have to use a single % percentage sign instead of the %% double percentage sign. wmic product where 'name like 'Java 7'' call uninstall /nointeractive wmic product where 'name like. Code: ECHO OFF If EXIST 'C:\JavaRemove.txt' goto :END cls TITLE Uninstalling Java 5-8 and Java fx.
![wmic uninstall script wmic uninstall script](https://content.spiceworksstatic.com/service.community/p/post_images/0000200662/57de3323/attached_image/Wmic.jpg)
This only works for products that use MSI's. I probably got this from someone on here (or off the net), but this worked for me. It searches all of the installed product's names for "winzip" and will uninstall anything it finds. GOTO : END : 64 " %programfiles(x86)% \WinZip\Winzip32.exe" /UninstallxÄŻor getting rid of WinZip 12, the magic happens in the 'wmic' line. REM REM This section is for WinZip <12 REM If Exist " %programfiles(x86)% \Winzip\winzip32.exe" GOTO 64 If Exist " %programfiles% \Winzip\winzip32.exe" " %programfiles% \WinZip\Winzip32.exe" /Uninstallx If 21H1 is removing wmic but not wmi, is there a powershell line that still uses wmi that functions similar to this wmic line I've found it very useful as a generic line of script that can work in a lot of cases. Wmic product where "name like ' %% winzip %% '" call Uninstall wmic product where 'name like 'SoftwareToUninstall'' call uninstall /nointeractive. hwinv if specified (and the ConfigMgr agent is installed on the system) runs. uninstall if specified actually runs the uninstall string.
![wmic uninstall script wmic uninstall script](https://helpdeskgeek.com/wp-content/pictures/2020/05/Windows-GetRemoteProgram-Script.png)
#Wmic uninstall script software
so this will kill REM all instances of IE after the UN-installation. The uninstall software script presented here takes one parameter (without which the script does almost nothing): /product:REM REM REM Detects winzip and silently uninstalls REM There is a un-stoppable pop-up window.