


REM It's faster to first locate the software GUID, then search it's Name, Version & UninstallStringįor /f "delims=" %%P in ('reg query "%x86GUID%" /s /f "%SoftwareName%" 2^>nul ^| findstr "HKEY_LOCAL_MACHINE"') do ( REM set Installer=d:\downloads\jre-8u172-windows-i586.exe REMOVEOUTOFDATEJRES=1 AUTO_UPDATE=0 EULA=0 NOSTARTMENU=1 SPONSORS=0 WEB_ANALYTICS=0 WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H /s Set Installer=\\dc\sources\jre-8u172-windows-i586.exe REMOVEOUTOFDATEJRES=1 AUTO_UPDATE=0 EULA=0 NOSTARTMENU=1 SPONSORS=0 WEB_ANALYTICS=0 WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H /s Set 圆4GUID=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall Set x86GUID=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall ::It extracts software software GUID, then use the GUID to search the name and off Check this out, this is using a batch find the software's UninstallString registry key and then uninstall the software silently which is much more reliable compare to wmic I found.
