Jump to content


firstcom

Java 8 Install

Recommended Posts

Good morning all,

 

Can I get some detailed feedback on how folks deploy Java 8 updates? I've got mine set up as an application with supersedence rules to remove old versions. However, the new install often errors out with code 1603.

 

I'm trying to deploy Java 8 Update 65.

 

The install works fine when msiexec is called from the local command line on the PCs, but not when it's deployed from SCCM. It's set up to run as Administrator, etc. The command line I'm using is:

 

msiexec /i "jre1.8.0_65.msi" AUTO_UPDATE=0 EULA=0 NOSTARTMENU=1 SPONSORS=0 WEB_ANALYTICS=0 WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H /qb

 

If you're using some kind of script, please share the script. If you somehow managed to get it to install as a simple application configured within SCCM, please share your parameters and details.

 

I'd appreciate any input and assistance that anyone can provide.

 

Thanks all!

Share this post


Link to post
Share on other sites

I hate Java. It has caused me the biggest headaches when mass deploying. Their installer is utterly S***.

 

When deploying it through SCCM, it gets even worse and as you have said, it throws random errors and is literally random.

 

However, below are the scripts I use which work for me deploying to 10k machines. A lot of blood and tears went into these (even if it is basic) and it's the only way I could get them to work. These use a config file aswell (read their website) and puts the exception.sites file in place. It also ensures updates are disabled and start menu cleaned. These are for x86 version so mirror for x64 also changing relevant parts.

 

This script should only be run when no versions of Java are installed:

@ECHO OFF
REM Red Wedding
taskkill /F /IM javaw.exe
taskkill /F /IM jqs.exe
taskkill /F /IM jusched.exe
del "C:\Program Files (x86)\Common Files\Java" /S /F /Q
REG DELETE "HKLM\SOFTWARE\Wow6432Node\JavaSoft" /f

REM Copy Config File Locally and Rename
XCOPY "%~dp0Config.cfg" "%systemdrive%\ProgramData\Oracle\Java\java.settings.cfg*" /R /H /Y

REM Install Java
msiexec /i "%~dp0jre1.8.0_60.msi" INSTALLCFG="%~dp0Config.cfg" REPAIRMODE=0 AUTO_UPDATE=0 EULA=0 INSTALL_SILENT=1 NOSTARTMENU=1 SPONSORS=0 /q /L C:\apps\java86.txt

REM Create Dir Structure
MD "%systemroot%\Sun\Java\Deployment\"

REM Copy Config Files
XCOPY "%~dp0deployment.config" "%systemroot%\Sun\Java\Deployment\deployment.config*" /R /H /Y
XCOPY "%~dp0deployment.properties" "%systemroot%\Sun\Java\Deployment\deployment.properties*" /R /H /Y

REM Copy Site Exceptions
xCOPY "\\SERVERSHARE\Java\exceptionsites\exception.sites" "%systemroot%\Sun\Java\Deployment\exception.sites*" /R /H /Y

REM Disable Updates Completely
REG ADD "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy" /f /v EnableJavaUpdate /t REG_DWORD /d 0
REG ADD "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment\1.8.0_60\MSI" /f /v AUTOUPDATECHECK /t REG_SZ /d 0
REG ADD "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment\1.8.0_60\MSI" /f /v JAVAUPDATE /t REG_SZ /d 0
REG ADD "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment\1.8.0_60\MSI" /f /v JU /t REG_SZ /d 0

REM Cleanup
RD "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Java\" /S /Q
del "C:\Program Files (x86)\Common Files\Java" /S /F /Q

I also found, that should there even be a trace of Java on the machine, then installing via SCCM will fail. So I made the below scripts to kill Java.

 

Java 6 and below:

wmic product where "name like 'Java(TM)%%'" call uninstall /nointeractive

RD "C:\Program Files\Java\jre6" /S /Q
RD "C:\Program Files (x86)\Java\jre6" /S /Q
REG DELETE "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment" /f
REG DELETE "HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" /f

Exit /B 0

Java 7:

wmic product where "name like 'Java 7%%'" call uninstall /nointeractive

RD "C:\Program Files\Java\jre7" /S /Q
RD "C:\Program Files (x86)\Java\jre7" /S /Q
REG DELETE "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment" /f
REG DELETE "HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" /f

Exit /B 0

Java Completely

wmic product where "name like 'Java%%'" call uninstall /nointeractive

RD "C:\Program Files\Java" /S /Q
RD "C:\Program Files (x86)\Java" /S /Q
RD "C:\ProgramData\Java" /S /Q
REG DELETE "HKLM\SOFTWARE\Wow6432Node\JavaSoft" /f
REG DELETE "HKLM\SOFTWARE\JavaSoft" /f
RD "%systemroot%\Sun\Java\Deployment\" /S /Q
RD "%systemdrive%\Microsoft\Windows\Start Menu\Programs\Java\" /S /Q
RD "%systemdrive%\ProgramData\Oracle\" /S /Q

Exit /B 0

Hope they help.

 

Rich Mawdsley

Share this post


Link to post
Share on other sites

Where do you get the MSI from? From the Oracle or some other source?

 

Regular offline installer exe. Run it, click past UAC prompt, and then stop.

Look in %appdata%\LocalLow\Oracle\Java\ - there'll be subfolders for whatever version(s) you're dealing with. MSIs are in there.

Replace Oracle with Sun if you're dealing with older versions (8u45 and earlier, 7u...??? everything? haven't messed with the final builds).

Share this post


Link to post
Share on other sites

 

Regular offline installer exe. Run it, click past UAC prompt, and then stop.

Look in %appdata%\LocalLow\Oracle\Java\ - there'll be subfolders for whatever version(s) you're dealing with. MSIs are in there.

Replace Oracle with Sun if you're dealing with older versions (8u45 and earlier, 7u...??? everything? haven't messed with the final builds).

Hey Jaybone,

Thanks for the update! I read somewhere that this MSI accepts Oracle switches (not the tradicional ones). True? Like /quiet is different?

 

And again, thanks!

Share this post


Link to post
Share on other sites

I already get the MSIs from the executables. That's what I use...

 

 

Hey Jaybone,

Thanks for the update! I read somewhere that this MSI accepts Oracle switches (not the tradicional ones). True? Like /quiet is different?

 

And again, thanks!

 

 

Regular offline installer exe. Run it, click past UAC prompt, and then stop.

Look in %appdata%\LocalLow\Oracle\Java\ - there'll be subfolders for whatever version(s) you're dealing with. MSIs are in there.

Replace Oracle with Sun if you're dealing with older versions (8u45 and earlier, 7u...??? everything? haven't messed with the final builds).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.