Deploying Java with SCCM 2012


After looking online how to deploy Java with System Center Configuration Manger (SCCM), I found a couple of ways to deploy them, but they did not work as expected. After combining different approaches here is the way I finish deploying Java via SCCM.

1. If you are using a 64bit version of Windows 7 or 8. You need to uninstall the 64bit version of Java before you re install it.

2. Make sure that IE is closed before you try the uninstall.

3. You should install both the 32bit and 64bit versions of Java.

4. Download the offline installer for Java 32bit and 64bit.

Steps to extract the Java MSI files.

  1. Execute the Installer for Java. DO NOT CLICK INSTALL
  2. Go to your C:Users%Username$AppDataLocalnowSunJava folder . Copy the Folder name JreX.X.X to a new folder.
  3. Name the folder x86 for the 32bit version and x64 for the 64bit version.
  4. Create a new folder in your SCCM Deployment Share and named it JreX.X.X or anything you would like.
  5. Place both folders x86 and x64 in the new folder created on step 4
  6. Create a new install.cmd file and copy the script
  7. Test the installation manually.
  8. Create an SCCM package and deploy it.

Here is a batch file to install Java. It uninstall Java first , then it install your new version of Java

———————- Install.cmd —————————-

@echo off

taskkill /F /IM iexplorer.exe

taskkill /F /IM iexplore.exe

taskkill /F /IM firefox.exe

taskkill /F /IM chrome.exe

taskkill /F /IM javaw.exe

taskkill /F /IM jqs.exe

taskkill /F /IM jusched.exe

REM Uninstall Java 64-bit

wmic product where “name like ‘%%Java%% 7 Update%% (64-bit)%%'” call uninstall

REM Uninstall Java 32-bit

wmic product where “name like ‘%%Java%% 7 Update%%'” call uninstall

REM Install JRE x86

msiexec.exe /i %~dp0x86jre1.7.0_45.msi /passive /norestart /l*v c:windowstempJava7x86.log

REM Installing JRE x64

if exist %ProgramFiles(x86)%

msiexec.exe /i %~dp0x64jre1.7.0_45.msi /passive /norestart /l*v c:windowstempJava7x64.log

REM Disable automatic updates

reg delete “HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun” /v SunJavaUpdateSched /f

reg add “HKEY_LOCAL_MACHINESoftwareJavaSoftJava UpdatePolicy” /v EnableJavaUpdate /t REG_DWORD /d 0 /f

REM Return the exit code to SCCM

exit /B %EXIT_CODE%

——- End of batch file – Do Not Copy This Line ——–

Original posting


Subscribe For Latest Updates

Sign up for best of digital marketing, livestream and technology opinions on what matters to you.

Invalid email address
We promise not to spam you. You can unsubscribe at any time.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: