spgsitsupport Posted January 27, 2016 Report post Posted January 27, 2016 This one works fine for me Quote Share this post Link to post Share on other sites More sharing options...
clarkey2r Posted March 31, 2016 Report post Posted March 31, 2016 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 I've created a basic script based on yours for Java 8 Update 73 (see below), the deployment fails, in the log file I see the bellow, any idea whats going on? I'm tearing my hair out with this shitty java install. Error MSI (s) (68:3C) [12:44:18:265]: Product: Java 8 Update 73 -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2705. The arguments are: Directory, , Script @ECHO OFF REM Kill Java taskkill /F /IM javaw.exe taskkill /F /IM jqs.exe taskkill /F /IM jusched.exe REM Remove Java 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 REM Copy Config File and Rename XCOPY "%~dp0Config.cfg" "%systemdrive%\ProgramData\Oracle\Java\java.settings.cfg*" /R /H /Y REM Install Java msiexec /i "%~dp0jre1.8.0_73.msi" INSTALLCFG="%~dp0Config.cfg" REPAIRMODE=0 AUTO_UPDATE=0 EULA=0 INSTALL_SILENT=1 NOSTARTMENU=0 SPONSORS=0 /q /L C:\win7Software\Java_Install.txt Any help would be much appreciated. Quote Share this post Link to post Share on other sites More sharing options...