How to remove old version of java during silent install?

1

I want to install Java silently and during this install, I want to uninstall older versions of Java.

Since 8.20 , there is an option to uninstall older version when you run the install (via the GUI).

So I want to know if there is an option for my command line when I want to install it?

Currently, the command line looks like:

java.exe /s

Thanks for your help.

TroyAndAbed

Posted 2015-09-08T16:00:14.603

Reputation: 111

Answers

1

If you want to uninstall older veserion of java :

Start /wait msiexec.exe /x {Product code of your older java 64bit} /qn /norestart

First we need to find the product code of java older version. For this go to regedit in path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and find your java version.

For my case of Java 8 Update 31 is 26A24AE4-039D-4CA4-87B4-2F83218031F0 for 32 bit.

For 64 bit only change this number 32 to 64: 2F83218031F0 to 2F86418031F0.

For more information see full post here.

Klodi

Posted 2015-09-08T16:00:14.603

Reputation: 11

Adding the detail from the linked post would improve your answer. – Dave M – 2015-10-26T15:31:50.853