Jak odinstalować Java SE z wiersza poleceń

10

Oracle twierdzi, że instalator Java SE jest zbudowany przy użyciu MSI, ale strona pomocy raczej niepomocnie nie wyświetla opcji odinstalowania.

Muszę odinstalować z wiersza poleceń i nie mogę znaleźć ani znaleźć odpowiednich opcji dla wersji 1.6.21

Próbowałem owijania instalator .exe w msiexec użyciu msiexec /q /x <jre>.exe, ale to tylko doniesienia, że pakiet instalacyjny nie mógł zostać otwarty.

Uruchomienie instalatora .exe z /s /xopcją po prostu zawiesza się.

Edytowano, aby dodać: msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160021} /q=> „Ta czynność jest ważna tylko w przypadku produktów, które zostały natychmiast zainstalowane”

Czy ktoś ma właściwą linię poleceń?

nick3216
źródło
1
Nie możesz go odinstalować zControl Panel -> Add/Remove Programs
2
Jest przeznaczony dla klastra obliczeniowego, więc najlepiej musi być odinstalowany z wiersza poleceń.
nick3216 15.03.11

Odpowiedzi:

8

Prawidłowy kod produktu można znaleźć, msiexec /xotwierając go w rejestrze ( regedit). Otwórz klucz:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Wybierz klucz Odinstaluj i „Znajdź” z menu „Edycja”. Wyszukaj „Java”. Powinno to pokazać, w którym podkluczu znajduje się Java. Jednym z kluczy jest „UninstallString”. Użyj tego polecenia, aby odinstalować Javę. Pamiętaj jednak, że zadziała to tylko na innych komputerach, jeśli zainstalowana jest dokładnie ta sama wersja Java.

ciężki
źródło
Zainstalowanie JDK 1.6u21 na lokalnym komputerze pozwoliło mi zobaczyć, że GUID nie jest tym, którego się spodziewałem (na podstawie dokumentacji Oracle i błędu serwera). Różnica JRE / JDK. reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{32A3A4F4-B792-11D6-A78A-00B0D0160210} /v uninstallString
nick3216 16.03.11
hmm, w węzłach obliczeniowych MSIEXEC zgłasza, że działanie jest poprawne tylko dla zainstalowanych produktów i reg query /s HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstallnie ma zapisu o instalacji JDK.
nick3216,
+1 Ta metoda zadziałała dobrze w celu odinstalowania spakowanego pakietu sterowników SQL Server 2012 rsfx.
Eddie B,
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall odwołuje się do programów 64-bitowych. Prawdopodobnie konieczne może być również sprawdzenie HKEY_LOCAL_MACHINE \ WOW6432Node \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall dla programów 32-bitowych. Java może być instalowana jako jedna lub obie jednocześnie
uniquegeek
odnosząc się do powyższego klucza rejestru, prawidłowa ścieżka do mojego komputera z Win10 REG QUERY "HKLM\Software\WOW6432Node\JavaSoft" WOW6432Nodepowinna być następującaSOFTWARE
SimplyInk
4

Istnieją 2 miejsca, w których możesz znaleźć kod produktu:

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

lub

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Powinieneś być w stanie znaleźć ciąg dezinstalacyjny z klucza UninstallString; coś jak:MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83216026FF}

Andy Chen
źródło
0

Do Twojej wiadomości, jeśli korzystasz z systemu Windows Server 2012 Core i próbujesz znaleźć ciąg dezinstalacyjny dla Java 7, przejdź do następującego miejsca w rejestrze, aby znaleźć ciąg dezinstalacyjny.

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
Brandon
źródło
0

Jest to trochę czasochłonne, ale co powiesz na:

wmic product where "name like 'java se%'" call uninstall
js2010
źródło
0

Wszystko zależy od wersji zainstalowanej na komputerze. W przypadku instalacji Java 8 poniższe informacje pochodzą z mojego dezinstalatora wsadowego.

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
źródło