Silent installation of the Java Runtime version 8 Update 25 (x64 and x86) will end in an error:
When installing by MSI, you’ll find the following failure in the Event Viewer under application: 1722 – There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected.
With a little modification in the MSI file (of course in the MST) and a file copy before deployment it will run.
Here are the steps to fix the problem:
- Download the current runtime from the Oracle Website in the OFFLINE version: link
- Extract the MSI from the “jre-8u25-windows-i586.exe” or “jre-8u25-windows-x64.exe” by starting the installation. When the first screen appears, you will find the extracted MSI file (jre1.8.0_25.msi) in the folder
or “%LOCALAPPDATA%Low\Sun\Java\jre1.8.0_25_x64” if extracting the x64 Java Runtime.
- Copy the MSI to another folder like C:\data
- Cancel the Java setup.
- Open the MSI with ORCA or an MSI Editing tool and create a MST File and change the following settings:
Open the table “CustomAction” and select the row “installexe”. Change the value in the field “Type” to 3074 (or Hex 0x0C02). This will set the NoImpersonate bit.
My additional PROPERTIES in the MST file are the following:
I know, not all Update Fields are needed, but like this I am sure, that Java is not updating automatically .
SAVE the MST File
- Unfortunately this is not enough. Now you’ll have another error: “Unable to install Java. Unable to open file C:\ProgramData\Oracle\Java\java.settings.cfg”
To solve this, you’ve to create the missing file BEFORE running the installation. You can add this to the MST File or copy it before running the main installation with a batch file or similar.
Create a blank file named “java.settings.cfg” and copy it to “%ALLUSERSPROFILE%\Oracle\Java”. The file can stay blank, because our install options are in the MSI / MST File.
Good luck and hope it will work also in your environment!