4

I am trying to set up our Active Directory DC to automatically install Java 8 Update 25 (jre1.8.0_25.msi) using Group Policy. When attempting to add the jre1.8.0_25.msi package in the GPO at Computer Configuration > Policies > Software Settings I receive the error:

Add operation failed. Unable to extract deployment information from the package.
Run validation on the package to ensure that the package is correct.

How can I install Java 8_25 silently across the domain?

Thanks!

UPDATE

Using information from these pages:

and the command line from this page:

I came up with this script:

:CheckOS
if exist %systemdrive%\"Program Files (x86)" 
(
    set bit=x64
)
else 
(
    set bit=i586
)

:CheckInstall
IF EXISTS %ProgramFiles%\Java\jre1.8.0_25\bin\java.exe GOTO END

msiexec /i {[NETWORKFOLDER]}\Repo\Java\jre1.8.0_25-%bit%.msi AUTO_UPDATE=0 EULA=0 NOSTARTMENU=1 SPONSORS=0 WEB_ANALYTICS=0 WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H /qb


:END

UPDATE (2) 11/13/2014

I thought I should provide an update in here for anyone who comes along behind to reference this. The script I provided works, but there are other problems with the JVM and JRE that you should be aware of in advance:

After exploring and testing different solutions, there seems to be a problem with 64 bit installations. Using my script, 64 bit Java 8 was installed on all of our 64 bit systems. However, none of the browsers recognized Java as being installed. The only solution that worked as to install Java 8 32 bit in addition to 64 bit. (32 bit would likely work on its own, but I haven't bothered to uninstall 64 bit)

  • I generally check the installation status of MSI-based packages by looking for their entry in HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall. – Evan Anderson Oct 23 '14 at 20:59
  • Thanks! I'll try this. I made a little progress yesterday, but I'm now having issues with Java throwing an error when it tries to install. – NonSecwitter Oct 24 '14 at 14:28
  • I can't comment yet so - just curious @NonSecwitter, where did you post the updated script you use? – user192324 Feb 4 '15 at 20:09
  • The script works fine, the problem is a bug in the 64 bit version. Your better off installing both versions on a 32 bit machine. I'm not sure if there is a newer version since my script, which may have fixed that bug. – NonSecwitter Feb 4 '15 at 20:13
4

First off, don't use the Software Installation GPOs. They suck.

Second off, make sure you have the proper "offline" Java installer.

Then, create a startup script, and put it a GPO at \Computer configuration\Policies\Windows Settings\Scripts\Startup to install it.

  • I'm not familiar with scripting. How can I check whether software is already installed? – NonSecwitter Oct 23 '14 at 19:40
  • 2
    @Hopelessn00b: While I certainly do install a lot of software via Startup Scripts, I do think that Group Policy Software Installation policy does work reasonably well. It has quirks, but it has served me well over the years. I'm in stark disagreement with the AD team blog on this, but 13 years of experience using this functionality has served me rather well. – Evan Anderson Oct 23 '14 at 19:44
  • @NonSecwitter There's probably a bunch of other ways to do it, but off the top of my head, I'd use the java -version command. Pretty sure that with 8u25 installed, the first line of output will show as java version "1.8.0_25", but I'd have to check that to be sure. That provide you with what you need, or do you need more help in punching up the script? (Like, just how "not familiar with scripting" are you?) – HopelessN00b Oct 23 '14 at 19:46
  • @HopelessN00b I'm unfamiliar with the specifics of scripting for Windows shell environment or making batch files. I can program in C++ and Java, so I get the basics. I'm looking around for sample scripts. I'll post if I find anything, unless someone comes up wiht something here first. – NonSecwitter Oct 23 '14 at 19:49
  • @NonSecwitter Well, I'll get to it later tonight and provide an example tailored to java 8u25, but you should have no problem if you can code. – HopelessN00b Oct 23 '14 at 19:54
0

Updated Information for 2017.

With the release of Java SE 8u20, Oracle introduced an MSI Enterprise JRE Installer.

There is a trick to it however and according to https://www.java.com/en/download/help/msi_install.xml its only for customers via "My Oracle Support"

This article helped me allot and also includes a download to the latest .msi file. http://www.thefunkytechguy.co.za/2017/01/how-to-deploy-java-with-active.html

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.