Como desinstalar o Java SE da linha de comando

10

A Oracle afirma que o instalador do Java SE foi criado usando o MSI, mas a página de ajuda , sem ajuda, não lista as opções de desinstalação.

Preciso fazer uma desinstalação da linha de comando e não consigo descobrir ou encontrar relevantes as opções para 1.6.21

Tentei agrupar o instalador .exe no msiexec usando msiexec /q /x <jre>.exe, mas isso apenas informa que o pacote de instalação não pôde ser aberto.

A execução do instalador .exe com a /s /xopção simplesmente trava.

Editado para adicionar: msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160021} /q=> "Esta ação é válida apenas para produtos instalados com urgência"

Alguém conseguiu a linha de comando correta?

nick3216
fonte
1
Não é possível desinstalá-lo a partir deControl Panel -> Add/Remove Programs
2
É para um cluster de computação e, idealmente, ele precisa ser desinstalado pela linha de comando.
nick3216

Respostas:

8

Você pode encontrar o código do produto correto a ser transmitido msiexec /x, abrindo no registro ( regedit). Abra a chave:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Selecione a chave Desinstalar e "Localizar" no menu "Editar". Procure por "Java". Isso deve mostrar em qual subchave o Java está localizado. Uma das chaves é "UninstallString". Use este comando para desinstalar o Java. Observe, no entanto, que isso só funcionará em outras máquinas se a mesma versão exata do Java estiver instalada.

pesado
fonte
Instalar o JDK 1.6u21 em um PC local me permitiu ver que o GUID não era o que eu esperava (com base nos documentos do Oracle e na falha do servidor). Uma diferença JRE / JDK. reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{32A3A4F4-B792-11D6-A78A-00B0D0160210} /v uninstallString
nick3216
hmm, nos nós de computação, o MSIEXEC informa que a ação é válida apenas para produtos instalados e reg query /s HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstallnão possui registro do JDK sendo instalado.
nick3216
+1 Este método funcionou bem para desinstalar um pacote de driver rsfx do SQL Server 2012 danificado.
Eddie B
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall referencia os programas de 64 bits. É provável que você também precise verificar HKEY_LOCAL_MACHINE \ WOW6432Node \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall para obter programas de 32 bits. Java pode ser instalado como qualquer um, ou os dois ao mesmo tempo
uniquegeek
referenciando a chave de registro acima, o caminho correto para a minha máquina Win10 REG QUERY "HKLM\Software\WOW6432Node\JavaSoft" WOW6432Nodedeve ser o seguinteSOFTWARE
SimplyInk
4

Existem 2 lugares onde você pode encontrar o código do produto:

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

ou

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Você deve encontrar a cadeia de desinstalação da chave UninstallString; algo como:MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216026FF}

Andy Chen
fonte
0

Para sua informação, se você estiver no Windows Server 2012 Core e tentar encontrar a sequência de desinstalação do Java 7, vá para o seguinte lugar no registro para encontrar a sequência de desinstalação.

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

Isso consome um pouco de tempo, mas que tal:

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

Tudo depende da versão que você instalou no seu PC. Para instalações do Java 8, o seguinte é do meu desinstalador em lote.

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
fonte