Get IT Solutions

How to do IT
Menu
  • Home
  • SCCM 2012
    • Deploy Packages
    • Troubleshooting errors SCCM 2012
  • Windows
    • Applications Silent Install
    • Windows Tools
    • Windows Error
    • Script
    • Exchange Server
    • Troubleshooting Office
    • Applications Errors
  • Database
    • SQL Server
    • MySQL
    • Oracle
  • Cybersecurity
  • Other
  • Reviews

Deploy Java 8 with SCCM 2012 and uninstall older version

In this tutorial we will explain how to Deploy Java 8 with package in the SCCM 2012. The deployment is based on script silently installation and install both version x32 and x64. The package will disable automatic update check. The entire process will be a silent install – your end-user won’t notice a thing! Included the tutorial for deploying java offline exe for version 8 update 91 or above.

If older version is detected, this package will first uninstall the older version of java then proceed with the installation of newer version. The following tasks included:

  • Deploy Java 8 x32 and install silently with script
  • Deploy Java 8 x64 and install silently with script
  • Disable Update Checking / Auto update
  • Deploy Java Offline Exe 8 update 91 and above versions.

Note: The script can run with and without SCCM 2012.

Create package on your PC for Deploy Java 8.

Preparation:

Please look the instruction how Download and extract msi for Java 8 on the previous post:

LINK : http://www.get-itsolutions.com/java-silent-install-version-8-and-uninstall-older-version/

Create a folder with name “ Deploy Java 8 .x Package ” and save the downloaded msi file for x32 and x64.

Find java product code.

Find the product code of java older version. For this go to regedit in path:

“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” and find your java version.

  • For my case of Java 8 Update 31 is “26A24AE4-039D-4CA4-87B4-2F83218031F0” for 32 bit.
  • For 64 bit only change this number 32 to 64: “2F83218031F0” to “2F86418031F0”.

Create .cmd script for deploy java 8.

Note! If the msi installer doesnt work please use the exe installer solution.

Open notepad and write the following command line and save on deploy java 8.x folder:


@echo off 
@rem DESCRIPTION: Deploy Java 8 x32 and x64
@echo off
@Rem === Variables_declaration-START =========
Set AppliName=Oracle Java Runtime JRE 8
Set Unin1=Uninstall old java 32Bit
Set Unin2=Uninstall old java 64Bit
Set PackageName=Oracle_Java-RunTime-8
Set LogfilepathCmd=C:\Log_Test\%PackageName%_Upd_Script.txt
@Rem === Variables_declaration-END ========
cls
if not exist "C:\Log_Test\" md "C:\Log_Test\"
@echo ----------------- >>%LogfilepathCmd%
@echo %AppliName% install script >>%LogfilepathCmd%
@echo This logs doesn't include the %AppliName% install logs. Please refer to the file for more information. >>%LogfilepathCmd%
@echo. >>%LogfilepathCmd% 
FOR /F  %%I IN ('DATE /T') DO FOR /F  %%J IN ('Time /T') DO echo %%I       %%J       >>%LogfilepathCmd%
@echo. >>%LogfilepathCmd%
Rem ===============================
Rem ========= Uninstallation          ===========
Rem ===============================
@echo ----------------------------- >>%LogfilepathCmd%
@echo Uninstallation  of %Unin1% >>%LogfilepathCmd%
REM Uninstall old Java 32 bit
Start /wait msiexec.exe /x {Product code of your older java 32 bit} /qn /norestart /l* "C:\Log_Test\%PackageName%_Unin_old_x32.txt"
set errorcode=%errorlevel%
If "%errorCode%"=="3010" (Set errorcode=0
@echo errorCode=3010, A restart is required to complet the install >>%LogfilepathCmd%
)
If "%errorCode%"=="1641" (Set errorcode=0
@echo errorCode=1641, The installer has initiated a restart >>%LogfilepathCmd%
)
@echo Return Code of %Unin1% Uninstallation = %errorcode% >>%LogfilepathCmd%
@echo. >>%LogfilepathCmd%
@echo Uninstallation  of %Unin2% >>%LogfilepathCmd%
REM Uninstall old java x64
Start /wait msiexec.exe /x {Product code of your older java 64bit} /qn /norestart /l* "C:\Log_Test\%PackageName%_Unin_old_x64.txt"
set errorcode=%errorlevel%
If "%errorCode%"=="3010" (Set errorcode=0
@echo errorCode=3010, A restart is required to complet the install >>%LogfilepathCmd%
)
If "%errorCode%"=="1641" (Set errorcode=0
@echo errorCode=1641, The installer has initiated a restart >>%LogfilepathCmd%
)
@echo Return Code of %Unin2% Uninstallation = %errorcode% >>%LogfilepathCmd%
@echo. >>%LogfilepathCmd%
Rem ==========================
Rem ========= Installation     ===========
Rem ==========================
@echo Installation  of %AppliName% >>%LogfilepathCmd%
REM Deploy Java 8 x32
start /wait msiexec /i "%~dp0jre1.8.0_40x32.msi" JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA=1 /q /l* "C:\Log_Test\%PackageName%_insta_Script_x32.txt"
If "%errorCode%"=="3010" (Set errorcode=0
@echo errorCode=3010, A restart is required to complet the install >>%LogfilepathCmd%
)
If "%errorCode%"=="1641" (Set errorcode=0
@echo errorCode=1641, The installer has initiated a restart >>%LogfilepathCmd%
)
@echo Return Code of %AppliName% installation = %errorcode% >>%LogfilepathCmd%
@echo. >>%LogfilepathCmd%
REM Deploy Java 8 X64
start /wait msiexec /i "%~dp0jre1.8.0_40x64.msi" JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA=1 /q /l* "C:\Log_Test\%PackageName%_insta_Script_x64.txt"
If "%errorCode%"=="3010" (Set errorcode=0
@echo errorCode=3010, A restart is required to complet the install >>%LogfilepathCmd%
)
If "%errorCode%"=="1641" (Set errorcode=0
@echo errorCode=1641, The installer has initiated a restart >>%LogfilepathCmd%
)
@echo Return Code of %AppliName% installation = %errorcode% >>%LogfilepathCmd%
@echo. >>%LogfilepathCmd%
del /S /F /Q "C:\Program Files (x86)\Common Files\Java" >> %LogfilepathCmd%
Rem ===========================
Rem ========= End of Script    ===========
Rem ==========================
:END
FOR /F  %%I IN ('DATE /T') DO FOR /F  %%J IN ('Time /T') DO echo %%I       %%J       >>%LogfilepathCmd%
@echo end of script >>%LogfilepathCmd%
@echo Error code script = %errorcode% >>%LogfilepathCmd%
@echo ----------------------- >>%LogfilepathCmd%
@echo. >>%LogfilepathCmd%
@echo. >>%LogfilepathCmd%
@echo. >>%LogfilepathCmd%
exit %errorcode%

More information’s about deploy Java 8:

This part is for disable java auto update

READ ALSO -   Deploy Google Chrome Package with SCCM 2012
“JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0”

Change “%~dp0jre1.8.0_40x32.msi”  jre1.8.0_40x32.msi with your named java x32 and jre1.8.0_40x64 with your named java x64.

The path

"C:\Log_Test\"

is for logs.

Deploy java offline exe installer.

This is for java version 8 update 91 and above. The java was changed procedures for msi files.

Download java offline installer and save to the folder.

Change the above script with the following command line :

REM Uninstall Java 8 Update 50
start /wait msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F83218051F0} /qn /norestart
REM Uninstall Java 8 Update 50 64 bit
start /wait msiexec.exe /x {26A24AE4-039D-4CA4-87B4-2F86418051F0} /qn /norestart
@ECHO OFF

start /wait jre-8u91-windows-i586.exe /s
start /wait jre-8u91-windows-x64.exe /s

@echo Disable Auto Updates

reg delete "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy\jucheck" /v "UpdateSchedule" /f
reg delete "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy\jucheck" /v "UpdateMin" /f
reg add "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy" /v EnableJavaUpdate /t REG_DWORD /d 00000000 /f
reg add "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy" /v EnableAutoUpdateCheck /t REG_DWORD /d 00000000 /f
reg add "HKCU\SOFTWARE\JavaSoft\Java Update\Policy" /v EnableJavaUpdate /t REG_DWORD /d 00000000 /f
Java Offline EXE Silent Installation

Java Offline EXE Silent Installation

Note! The other procedures is the same.

Step 2: Create package for Deploy Java 8 on SCCM 2012.

Note: If you want to install the package without deployment, just right-click on the “install.cmd” and run as administrator. Check logs for the perform of the installation.

To create the package follow the instruction in the previous post :

http://www.get-itsolutions.com/deploy-adobe-flash-player-17-package-with-sccm/

The package folder looks like:

Deploy Java 8

Deploy Java 8

Start deployment and you can monitor on the Monitoring menu under Deployments tabs.

Uninstall other version of java.

If you need to uninstall other version of java just copy another line on notepad (install.cmd). Replace product code with your other java version product code:


REM Uninstall Java X 32bit (replace with your java version)

Start /wait msiexec.exe /x {Product code of your older java} /qn /norestart

In this way you can uninstall all version of java in your computer.

 

If you have any question about deploy java 8, do feel free to ask in the comment section.

—————————————————————————————————————

Share
Tweet
Google+
Pinterest
Linkedin
Stumble
Email
Prev Article

Related Articles

Specify schedule for the deployment
In this tutorial we will explain how to deploy adobe …

Deploy Adobe Flash Player package with SCCM

Deploy Google Chrome Package with SCCM 2012
In this tutorial we will explain how to Deploy Google …

Deploy Google Chrome Package with SCCM 2012

Best Computers & Laptops

Best Computer for Cyber Security – Laptop and Desktop
Best Computer for Cyber Security
Hey, are you seeking the best computer for cyber security? Well, we must say you have come to the right place to find your answer and guidance. There are a plethora of products out there for you to pick from ...
Read More
Best Computer for Microsoft Office & Excel – Laptop and Desktop
Best Computer for Microsoft Office & Excel
Are you finding the Best Computer for Microsoft Office and Excel? In modern days, the best laptop or desktop set is the one which is both portable, has good looks and offers the smoothest performance. Microsoft Office is a package ...
Read More
Best Computer for Hacking – Laptop and Desktop Selection
Best computer for Hacking
When it comes to hacking, either laptop or desktop, choosing the best computer for hacking would be an exhilarating job. There are many specifications to be considered for hacking ...
Read More

SQL Server Tips

FIX sqlstate 42000 – mysql error 1064 – you have an error in your sql syntax
Sqlstate 42000 Is a general code that come together with other number. Most often comes with the code 1064 and ...
Read More
The execute permission was denied on the object – SQL Server Error
The execute permission was denied on the object
The following article will handle “the execute permission was denied on the object” error appears on SQL Server. This error ...
Read More
How to Read Data from LDF file in SQL Server – A Complete Guide
Read LDF File
Hello Everyone, Today we are going to address the most popular query of SQL users, how to read data from ...
Read More

Search

We are on:

Get FREE SPACE for your PC

3 Method to Delete Temp Files in Windows 7/10 including vbs script

In this post we will explain how to delete temp files windows 7 using three different methods including vbs script ...
Read More

Fastest way to delete hiberfil sys from windows 10/8/7 and XP – CMD

In this article we will explain how to remove or delete hiberfil sys from Windows 10/8/7 and XP . If you does ...
Read More

Learn How to Silent Install Applications

Silent Install Adobe Flash Player
In this tutorial will explain how to silent install adobe flash player 25, Msi and Exe version. How to disable auto update and uninstall older ...
Read More
Java Silent Install and Uninstall Older Version – Deploy Package MSI
This tutorial will explain how to silent install Java MSI/EXE version and disable auto-update. The command line will also uninstall the ...
Read More
Silent Install Adobe Shockwave Player 12 and disable update
In this tutorial will explain how to silent install Adobe Shockwave Player 12 msi and disable auto update. The command will uninstall older ...
Read More
Silent Install Google Chrome MSI, Silent Uninstall and Disable Auto Update
This tutorial will explain how to silent install Google Chrome MSI and disable auto update. The command will uninstall older version of ...
Read More
Silent Install Adobe Reader 11 and DC – msi and exe – disable update
In this tutorial will explain how to silent install Adobe Reader version 11 and DC. We will user both version "msi" ...
Read More
Silent Install Mozilla Firefox msi and exe file – Including Silent Uninstallation
This tutorial will explain how to silent install Mozilla Firefox. We will use MSI and EXE files to perform a silent ...
Read More
Skype Silent Install Msi and disable updates
In this tutorial will explain how to silent install skype  and disable auto update. The command will uninstall older version of Skype and ...
Read More
Filezilla Silent Install msi and exe version
Filezilla silent install tutorial will explain how to perform a silent installation of application. We will explain methods, silent install ...
Read More
Silent install VLC Media Player
In this tutorial will explain how to silent install VLC Media Player. We will explain both methods for exe and ...
Read More
Notepad++ silent install exe and msi version – Command Line
Notepad++ silent install is the new article from a series of silent installations. Notepad++ as free software has two main ...
Read More

Batch File Solutions

How to list files in cmd – Command Prompt – Windows 10
Whenever you want to search and make a list of all files on a specific folder, you used the windows ...
Read More
Batch rename multiple files in folder – CMD script – Bulk Method – Win 10
The following article will teach how to rename multiple files in a folder with the bulk method using Command Line ...
Read More
Batch script rename file using Command Line (CMD) & PowerShell – Windows 10
The following article will use the “rename” or “ren” command to rename the file using a command prompt. Also, we ...
Read More
Change extension of multiple files at once – CMD batch file
The following article will teach the methods to change the extension of multiple files at once using command prompt and ...
Read More
How to delete registry key with command line | PowerShell | Batch
The following article is the third of series about registry and working on it through command line (CMD) and PowerShell ...
Read More
How to add registry key & values with CMD | PowerShell | Batch
The registry is the place where most of the applications store the settings but not only. Used also from the ...
Read More
Unmap Network Drive CMD – (Batch file) – net use delete command
After we posted the methods to map network drive using cmd commands we come this time with the method to ...
Read More
Map Network Drive cmd (batch file) – net use user password
This article will focus on another way to map a network drive on your computer instead of from the explorer ...
Read More
How to Find Large Files on Windows 7 & 10 – CMD Forfiles Command
If the capacity of your hard drive is running low, it is time to clean off some files and to ...
Read More
CMD Script to check disk space on windows and multiple remote servers
The following article will provide you script to check disk space. The Script monitor space on windows and multiple remote ...
Read More

Get IT Solutions

How to do IT

About Us

Get IT Solutions is a personal blog, which is managed to guide people for various topic.

Second Menu

  • Donate
  • About Us
  • Contact Us
  • Privacy Policy

What Will You Find

Automation is our area of writing where are included scripts, batch and various tips to automate your daily job.
Copyright © 2025 Get IT Solutions