Install Java msi through group policy

Get msi by running install exe but stop before clicking 'install'
Go to %appdata%/localow/oracle/ grab .msi file

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:


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.

Run installation and you should be done.