Updating java, what happens to the old java
I know with a traditional java install, it prompts you to uninstall any old java versions. When I use PDQ Deploy to install the newest version of Java, will it uninstall the older versions? I have a couple systems that need legacy version of java for certain applications.
Thanks
0
Comments
Hi Jason,
i could solve that problem with a batch. Just add a install step and use this following .bat.
You have to adjust with every release the version, and replace the java.msi.
regards, tommy
@ECHO OFF
::Check Current Version here
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_71" goto END
::uninstall you older versions here if current version is not installed
wmic product where "name like 'Java 2%%'" call uninstall /nointeractive
wmic product where "name like 'Java 6%%'" call uninstall /nointeractive
wmic product where "name like 'Java 7%%'" call uninstall /nointeractive
wmic product where "name like 'Java 8%%'" call uninstall /nointeractive
wmic product where "name like 'JavaFX%%'" call uninstall /nointeractive
wmic product where "name like 'Java(TM) 7%%'" call uninstall /nointeractive
wmic product where "name like 'Java(tm) 6%%'" call uninstall /nointeractive
wmic product where "name like 'Java(tm) 8%%'" call uninstall /nointeractive
wmic product where "name like 'J2SE Runtime Environment%%'" call uninstall /nointeractive
::Install Current Version here
msiexec /i \\your-path\jre1.8.0_71.msi /qn
:END
exit
i wouldnt install a newer java, if a few clients need a older versions for some special applications.
If u need java 6.0.46 asex, edit this .bat:
IF EXIST "C:\Program Files (x86)\Java\jre1.6.0_46" goto END
IF EXIST "C:\Program Files (x86)\Java\jre1.8.0_71" goto END
we have the same situation here, cause some of our heavy metal machines (or our HiPath), need legacy versions of java.
You can really easy edit this .bat for every situation.
Much appreciated. I am well aware of Java vulnerabilities and risks of upgrading to new versions but I am not in the position ATM to make the call. I get my orders and then proceed.
On the command line for these machines you need to add STATIC=1 That will keep the old ones installed
http://docs.oracle.com/javase/8/docs/technotes/guides/install/config.html#table_config_file_options