Cómo desinstalar Java SE desde la línea de comandos

10

Oracle afirma que el instalador de Java SE está construido con MSI, pero la página de ayuda , bastante inútil, no enumera las opciones de desinstalación.

Necesito hacer una desinstalación de línea de comandos, y no puedo entender o encontrar relevantes las opciones para 1.6.21

Intenté envolver el instalador .exe en msiexec usando msiexec /q /x <jre>.exe, pero esto solo informa que el paquete de instalación no se pudo abrir.

Ejecutar el instalador .exe con la /s /xopción simplemente se bloquea.

Editado para agregar: msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160021} /q=> "Esta acción solo es válida para productos que están instalados actualmente"

¿Alguien tiene la línea de comando correcta?

nick3216
fuente
1
¿No puedes desinstalarlo?Control Panel -> Add/Remove Programs
2
Es para un clúster de cómputo, por lo que idealmente debe ser la desinstalación de la línea de comandos.
nick3216

Respuestas:

8

Puede encontrar el código de producto correcto para pasar msiexec /xabriendo en el registro ( regedit). Abre la llave:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Seleccione la tecla Desinstalar y "Buscar" en el menú "Editar". Busque "Java". Esto debería mostrar en qué subclave se encuentra Java. Una de las claves es "UninstallString". Use este comando para desinstalar Java. Sin embargo, tenga en cuenta que esto solo funcionará en otras máquinas si está instalada exactamente la misma versión de Java.

pesado
fuente
La instalación de JDK 1.6u21 en una PC local me permitió ver que el GUID no era el que esperaba (basado en Oracle Docs & Server Fault). Una diferencia JRE / JDK. reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{32A3A4F4-B792-11D6-A78A-00B0D0160210} /v uninstallString
nick3216
hmm, en los nodos de cómputo MSIEXEC informa que la acción solo es válida para los productos que están instalados y reg query /s HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstallno tiene registro del JDK que se está instalando.
nick3216
+1 Este método funcionó bien para desinstalar un paquete de controlador rsfx de SQL Server 2012 fallido.
Eddie B
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall hace referencia a los programas de 64 bits. Es probable que también deba verificar HKEY_LOCAL_MACHINE \ WOW6432Node \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall para programas de 32 bits. Java puede instalarse como uno o ambos al mismo tiempo
uniquegeek
haciendo referencia a la clave de registro anterior, la ruta correcta para mi máquina Win10 REG QUERY "HKLM\Software\WOW6432Node\JavaSoft" WOW6432Nodedebe ser después deSOFTWARE
SimplyInk
4

Hay 2 lugares donde puede encontrar el código del producto:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\4EA42A62D9304AC4784BF238120662FF\InstallProperties

o

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Debería poder encontrar la cadena de desinstalación de la clave UninstallString; algo como:MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216026FF}

Andy Chen
fuente
0

Para su información, si está en Windows Server 2012 Core e intenta encontrar la cadena de desinstalación para Java 7, vaya al siguiente lugar en el registro para encontrar la cadena de desinstalación.

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
Brandon
fuente
0

Esto lleva un poco de tiempo, pero ¿qué tal:

wmic product where "name like 'java se%'" call uninstall
js2010
fuente
0

Todo depende de la versión que haya instalado en su PC. Para las instalaciones de Java 8, lo siguiente es de mi desinstalador por lotes.

IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_11\bin\java.exe" ECHO Uninstalling Java 8u11...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218011F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_20\bin\java.exe" ECHO Uninstalling Java 8u20...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218020F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_25\bin\java.exe" ECHO Uninstalling Java 8u25...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218025F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_31\bin\java.exe" ECHO Uninstalling Java 8u31...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218031F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_40\bin\java.exe" ECHO Uninstalling Java 8u40...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218040F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_45\bin\java.exe" ECHO Uninstalling Java 8u45...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218045F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_51\bin\java.exe" ECHO Uninstalling Java 8u51...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218051F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_60\bin\java.exe" ECHO Uninstalling Java 8u60...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218060F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_65\bin\java.exe" ECHO Uninstalling Java 8u65...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218065F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_66\bin\java.exe" ECHO Uninstalling Java 8u66...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218066F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_71\bin\java.exe" ECHO Uninstalling Java 8u71...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218071F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_72\bin\java.exe" ECHO Uninstalling Java 8u72...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218072F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_73\bin\java.exe" ECHO Uninstalling Java 8u73...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218073F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_74\bin\java.exe" ECHO Uninstalling Java 8u74...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218074F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_77\bin\java.exe" ECHO Uninstalling Java 8u77...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218077F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_91\bin\java.exe" ECHO Uninstalling Java 8u91...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218091F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_101\bin\java.exe" ECHO Uninstalling Java 8u101...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180101F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_111\bin\java.exe" ECHO Uninstalling Java 8u111...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180111F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_121\bin\java.exe" ECHO Uninstalling Java 8u121...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180121F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_131\bin\java.exe" ECHO Uninstalling Java 8u131...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180131F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_141\bin\java.exe" ECHO Uninstalling Java 8u141...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180141F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_144\bin\java.exe" ECHO Uninstalling Java 8u144...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180144F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_151\bin\java.exe" ECHO Uninstalling Java 8u151...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180151F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_152\bin\java.exe" ECHO Uninstalling Java 8u152...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180152F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_161\bin\java.exe" ECHO Uninstalling Java 8u161...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180161F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_162\bin\java.exe" ECHO Uninstalling Java 8u162...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180162F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_171\bin\java.exe" ECHO Uninstalling Java 8u171...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180171F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_172\bin\java.exe" ECHO Uninstalling Java 8u172...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180172F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_181\bin\java.exe" ECHO Uninstalling Java 8u181...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180181F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_191\bin\java.exe" ECHO Uninstalling Java 8u191...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180191F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_192\bin\java.exe" ECHO Uninstalling Java 8u192...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180192F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_201\bin\java.exe" ECHO Uninstalling Java 8u201...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180201F0} /Q
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_202\bin\java.exe" ECHO Uninstalling Java 8u202...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180202F0} /Q

IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_11\bin\java.exe" ECHO Uninstalling Java 8u11...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218011F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_20\bin\java.exe" ECHO Uninstalling Java 8u20...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218020F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_25\bin\java.exe" ECHO Uninstalling Java 8u25...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218025F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_31\bin\java.exe" ECHO Uninstalling Java 8u31...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218031F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_40\bin\java.exe" ECHO Uninstalling Java 8u40...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218040F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_45\bin\java.exe" ECHO Uninstalling Java 8u45...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218045F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_51\bin\java.exe" ECHO Uninstalling Java 8u51...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218051F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_60\bin\java.exe" ECHO Uninstalling Java 8u60...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218060F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_65\bin\java.exe" ECHO Uninstalling Java 8u65...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218065F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_66\bin\java.exe" ECHO Uninstalling Java 8u66...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218066F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_71\bin\java.exe" ECHO Uninstalling Java 8u71...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218071F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_72\bin\java.exe" ECHO Uninstalling Java 8u72...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218072F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_73\bin\java.exe" ECHO Uninstalling Java 8u73...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218073F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_74\bin\java.exe" ECHO Uninstalling Java 8u74...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218074F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_77\bin\java.exe" ECHO Uninstalling Java 8u77...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218077F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_91\bin\java.exe" ECHO Uninstalling Java 8u91...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218091F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_101\bin\java.exe" ECHO Uninstalling Java 8u101...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180101F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_111\bin\java.exe" ECHO Uninstalling Java 8u111...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180111F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_121\bin\java.exe" ECHO Uninstalling Java 8u121...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180121F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_131\bin\java.exe" ECHO Uninstalling Java 8u131...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180131F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_141\bin\java.exe" ECHO Uninstalling Java 8u141...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180141F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_144\bin\java.exe" ECHO Uninstalling Java 8u144...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180144F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_151\bin\java.exe" ECHO Uninstalling Java 8u151...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180151F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_152\bin\java.exe" ECHO Uninstalling Java 8u152...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180152F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_161\bin\java.exe" ECHO Uninstalling Java 8u161...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180161F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_162\bin\java.exe" ECHO Uninstalling Java 8u162...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180162F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_171\bin\java.exe" ECHO Uninstalling Java 8u171...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180171F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_172\bin\java.exe" ECHO Uninstalling Java 8u172...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180172F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_181\bin\java.exe" ECHO Uninstalling Java 8u181...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180181F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_191\bin\java.exe" ECHO Uninstalling Java 8u191...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180191F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_192\bin\java.exe" ECHO Uninstalling Java 8u192...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180192F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_201\bin\java.exe" ECHO Uninstalling Java 8u201...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180201F0} /Q
IF NOT EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_202\bin\java.exe" ECHO Uninstalling Java 8u202...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F32180202F0} /Q

IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_11\bin\java.exe" ECHO Uninstalling Java 8u11...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418011F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_20\bin\java.exe" ECHO Uninstalling Java 8u20...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418020F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_25\bin\java.exe" ECHO Uninstalling Java 8u25...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418025F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_31\bin\java.exe" ECHO Uninstalling Java 8u31...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418031F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_40\bin\java.exe" ECHO Uninstalling Java 8u40...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418040F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_45\bin\java.exe" ECHO Uninstalling Java 8u45...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418045F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_51\bin\java.exe" ECHO Uninstalling Java 8u51...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418051F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_60\bin\java.exe" ECHO Uninstalling Java 8u60...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418060F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_65\bin\java.exe" ECHO Uninstalling Java 8u65...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418065F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_66\bin\java.exe" ECHO Uninstalling Java 8u66...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418066F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_71\bin\java.exe" ECHO Uninstalling Java 8u71...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418071F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_72\bin\java.exe" ECHO Uninstalling Java 8u72...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418072F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_73\bin\java.exe" ECHO Uninstalling Java 8u73...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418073F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_74\bin\java.exe" ECHO Uninstalling Java 8u74...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418074F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_77\bin\java.exe" ECHO Uninstalling Java 8u77...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418077F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_91\bin\java.exe" ECHO Uninstalling Java 8u91...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418091F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_101\bin\java.exe" ECHO Uninstalling Java 8u101...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180101F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_111\bin\java.exe" ECHO Uninstalling Java 8u111...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180111F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_121\bin\java.exe" ECHO Uninstalling Java 8u121...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180121F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_131\bin\java.exe" ECHO Uninstalling Java 8u131...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180131F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_141\bin\java.exe" ECHO Uninstalling Java 8u141...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180141F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_144\bin\java.exe" ECHO Uninstalling Java 8u144...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180144F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_151\bin\java.exe" ECHO Uninstalling Java 8u151...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180151F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_152\bin\java.exe" ECHO Uninstalling Java 8u152...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180152F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_161\bin\java.exe" ECHO Uninstalling Java 8u161...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180161F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_162\bin\java.exe" ECHO Uninstalling Java 8u162...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180162F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_171\bin\java.exe" ECHO Uninstalling Java 8u171...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180171F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_172\bin\java.exe" ECHO Uninstalling Java 8u172...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180172F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_181\bin\java.exe" ECHO Uninstalling Java 8u181...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180181F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_191\bin\java.exe" ECHO Uninstalling Java 8u191...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180191F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_192\bin\java.exe" ECHO Uninstalling Java 8u192...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180192F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_201\bin\java.exe" ECHO Uninstalling Java 8u201...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180201F0} /Q
IF EXIST "C:\Program Files (x86)" IF EXIST "C:\Program Files\Java\jre1.8.0_202\bin\java.exe" ECHO Uninstalling Java 8u202...&MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F64180202F0} /Q
DDBivens
fuente