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.

3 Answers 3

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.

1
  • Adding the detail from the linked post would improve your answer.
    – Dave M
    Oct 26, 2015 at 15:31
1

On later x64 versions, you should use REMOVEOLDERJRES=1

I hope this helps

0

Per the Java website you can enable this by adding REMOVEOUTOFDATEJRES=1 so it would be java.exe /s REMOVEOUTOFDATEJRES=1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .