3

I am trying to install Java in silent mode from a batch file with the command

jre-8u60-windows-i586 INSTALLCFG=jresilent.properties

The properties file is in the same folder like the JRE installer.

Whatever I do, I get the error

---------------------------
Java Installation Not Completed
---------------------------
Unable to install Java

There are errors in the following switches:
"INSTALLCFG=jresilent.properties";.

Check that the commands are valid and try again.
---------------------------
OK   
---------------------------

Java Silent Error Message

I have tried:

  1. renaming the file to end with .properties (was .cfg before)
  2. use different line endings (Linux / Windows)
  3. minimize the number of options in the config file to just REBOOT=Disable
  4. run as administrator
  5. explicitly cd /d into the directory of the installer

2 Answers2

4

It worked when I specified the full path of the config file. Therefore I now use

cd /d %~dp0
jre-8u60-windows-i586 INSTALLCFG=%~dp0\jresilent.properties

in my batch file, where %~dp0 finds the directory of the batch file.

0

You can use msi for silent installation.

The command :

start /wait msiexec /i "%~ java8.40x64.msi " JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA=1 /q

For more information see full post here.

VL-80
  • 4,693
Klodi
  • 11