/build/static/layout/Breadcrumb_cap_w.png

Java 6 Installation Unattended (x86 and x64)

 In my research I found several post on how to deploy Java in Windows environments. For my purposes this is the method I used:
The purposes:
So Silent Install Java;
Disable Auto-Update and Auto Check UPDATEs;

  1. Download the Offline versions for 32 Bit and 64 Bit in http://java.com/en/download/manual.jsp
  2. Run the executable to extract the binaries and get in C: \ Users \% username% \ AppData \ LocalLow \ Sun \ Java (if you have not changed the way). 
  3. Copy their folders (and jre1.6.0_XX_x64 jre1.6.0_XX_) to a shared folder eg \ \ server \ software \ Sun \ Java.
  4. Create two files with a text editor (Notepad, Notepad + +).A Batch file with the name you want (install.bat) and another deployment.config.
    • Batch File Edit and put the following code:

@echo off
TITLE Sun J2SE Runtime Environment 6 Update 31..
@if %PROCESSOR_ARCHITECTURE%==x86 goto 32BIT
@if %PROCESSOR_ARCHITECTURE%==AMD64 goto 64BIT

@:64BIT

MSIEXEC /I "jre1.6.0_31_x64\jre1.6.0_31.msi" /qb /norestart /log %temp%/jre_%date%.log
XCOPY deployment.config %windir%\Sun\Java\Deployment\ /Y
REG.EXE ADD "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy" /v EnableJavaUpdate /t REG_DWORD /d 0 /f
REG.EXE ADD "HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy" /v EnableAutoUpdateCheck /t REG_DWORD /d 0 /f

cls

@goto END

@:32BIT

MSIEXEC /I "jre1.6.0_31\jre1.6.0_31.msi" /qb /norestart /log %temp%/jre_%date%.log
XCOPY deployment.config %windir%\Sun\Java\Deployment\ /Y
REG.EXE ADD "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" /v EnableJavaUpdate /t REG_DWORD /d 0 /f
REG.EXE ADD "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" /v EnableAutoUpdateCheck /t REG_DWORD /d 0 /f
cls

@:END
EXIT

 

    • Edit deployment.config and put the following text:

 

deployment.javaws.autodownload="NEVER"
deployment.javaws.autodownload.locked

  1. Run with administrative privileges Batch and he will do the rest.

 

The file "deployment.config" have configurations described in here http://docs.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/properties.html , and must be copied to %windir%\Sun\Java\Deployment.

I Hope it helps how helped me.


Comments

  • The Oracle web page says the file should be called 'deployment.properties' not 'deployment.config'. Have you discovered an error in their documentation?

    Also, 64 bit Windows has both 64 and 32 bit browsers so it is recommended to install both versions of Java. Great work putting this together. - spoirier 11 years ago
  • @spoirier:

    The web page says 'deployment.config' is the system-wide used config(!)file stored in the system/windows directory whereas 'deployment.properties' is the user-level properties(!)file stored in the AppData directory. You can use the configfile to point to a properties file that's not in the appdata folder but also in %WINDIR%\Sun\...

    @clrogon

    Thanks for your work but some things are a little twisted in your guide: 'HKLM\SOFTWARE\Wow6432Node\JavaSoft' is the 32 Bit registry hive and 'HKLM\SOFTWARE\JavaSoft' is the 64 Bit registry hive so you should use them in the correct order/sections.

    This scheme is the same as the system folder: %WINDIR%\system32 = 64 Bit files; %WINDIR%\SysWoW6432 = 32 Bit files. WoW = Windows-on-Windows (emulation).

    Second thing is that you used deployment.config to disable AU which likely doesn't work. In this file you only specify where your properties file is and how Java is supposed to behave wether it finds the file or not:

    deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
    deployment.system.config.mandatory=false

    Inside the properties file you then pt the two lines that will prevent AU and it's changing:

    deployment.javaws.autodownload="NEVER"
    deployment.javaws.autodownload.locked

    Source: http://docs.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/properties.html - Popopinsel 11 years ago
  • In fact, you need both deployment.config and deployment.properties.

    You can create an extra deployment.properties file in the same folder with following lines:

    deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
    deployment.system.config.mandatory=false

    Also, in the deployment.config you should drop the quotes around NEVER, with the quotes it will not work:

    deployment.javaws.autodownload=NEVER


    if you put then both files in %windir%\sun\java\deployment it will work - fabrice.aneca 11 years ago
This post is locked

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ