Unattended Install of OpenJDK 11

Latest response


I’m scripting an unattended install of OpenJDK 11, to be later integrated into an Ansible playbook.

While working through the msiexec command line options, I’m finding that the msi is either changing or ignoring some of the options being passed in.

For example, I’m passing in ROOTDRIVE=D:\ INSTALLDIR=D:\OpenJDK11 but the directory is changed as seen in the log below:

Modifying INSTALLDIR property. Its current value is 'D:\OpenJDK11'. Its new value: 'D:\RedHat\java-11-openjdk-11.0.8-2\'.

Also, the ADDLOCAL items are ignored. The path is not modified, JAVA_HOME is not added, the registry is not changed and the OpenJDK uninstaller is not listed under Control Panel\Programs\Programs and Features.

Here is the full command I’m running:

msiexec /a java-11-openjdk- ROOTDRIVE=D:\ INSTALLDIR=D:\OpenJDK11 ADDLOCAL="jdk_registry_standard,jdk,jdk_env_path,jdk_env_java_home" /quiet /qn /norestart /L*V "D:\install.log"

Why is the msi changing or ignoring the command line options I’m passing in?


Hola que tal Matt,

Yo hice lo mismo pero use la version 8 (no creo que genere diferencia). La diferencia fue el valor de "INSTALLDIR" lo puse entre comillas:

INSTALLDIR="C:\Program Files\Java"

y asi me ha funcionado desde un .bat

Espero te sirva, saludos.