Jump to content
WinCert-GuEsT

Sun Java Runtime Environment 6 Update 19

Recommended Posts

EDIT: updated 4/5/10 - only change is "java.reg" file...

EDIT: 4/8/10 - edited for clarity...

this is based off of Kel's silent install executable for Java...

please note upfront that this project belongs to Kel and i offer the below "how to" more for educational purposes than anything...

all the steps are already presented on this site, this thread just turns the generalized algorithm into a step-by-step process specific to Java in hopefully an easy-to-follow newbie format - a "teach a man to fish, feed him for a lifetime" approach...

the below has only been tested in Windows XP Pro, SP3, 32-bit...

FIRST, download all of the items that will be needed (i save them to the desktop)...

1) Java 6u19, jre-6u19-windows-i586-s.exe - http://www.filehippo.com/download_jre_32/

2) 7zSD - http://7zsfx.solta.ru/en/files/715/7zSD.7z

3) 7-Zip - http://sourceforge.net/projects/sevenzip/files/7-Zip/ -> 7za465.zip (latest non-beta)

4) UPX - http://upx.sourceforge.net/#download -> upx304w.zip (console, i've not tried the dos)

*ResHacker is OPTIONAL and will be SKIPPED for this guide (i personally skip this step)...

if you want to change the ICON of the executable created, this OPTIONAL step would do that...

SECOND, this step is OPTIONAL...

IF you wish to port your current Java Console settings to your new install, you will need to copy a file before uninstalling your current Java version...

the file is named "deployment.properties"...

it is located at "<drive>:\Documents and Settings\<username>\Application Data\Sun\Java\Deployment"...

Simply copy the "deployment.properties" file to your desktop and we will use it later...

this OPTIONAL step requires an additional downloaded file -

NirCmd - http://www.nirsoft.net/utils/nircmd.zip

(pretty cool utility, more info at http://www.nirsoft.net/utils/nircmd.html)

THIRD, uninstall your current Java install (i do this more for self-assurance, to be honest, i "think" Kel just installs his "on top of" the current install, but don't quote me on that)... after uninstalling, i use CCleaner - http://www.ccleaner.com/ - to do a registry cleaning... i also delete any and all folders by the name of "Sun" &/or "Java" (but this can also be considered "optional" as the contents would just get overwritten with the updated files anyway)...

FOURTH, we are now starting our actual silent install executable creation, the meat of the matter...

click/double-click the "jre-6u19-windows-i586-s.exe" we downloaded earlier...

DO NOT DO THE ACTUAL INSTALL - by "executing" the file, it EXTRACTS the files that we will need...

let it do the "extraction" then let it 'sit there' until we COPY the files, then we CANCEL the install...

COPY the TWO files that it extracts to "<drive>:\Documents and Settings\<username>\Application Data\Sun\Java\jre1.6.0_19"...

the two files will be "Data1.cab" and "jre1.6.0_19.msi"...

CREATE a new folder (i use the desktop) called "Java6u19"...

CREATE a new folder in Java6u19 called "Bin"...

PASTE the TWO files into this "Bin" folder...

now CANCEL the Java Setup installation - we now have what we need "out of it"...

FIFTH...

extract the '7zsd.sfx' file from the downloaded "7zSD.7z" into the "Java6u19" folder (NOT the Bin)...

extract the '7za.exe' file from the downloaded "7za465.zip" into the "Java6u19" folder (NOT the Bin)...

extrace the 'upx.exe' file from the downloaded "upx304w.zip" into the "Java6u19" folder (NOT the Bin)...

the "Java6u19" folder should only have THREE files in it and ONE folder...

and the "Bin" folder should only have TWO files in it...

SIXTH...

this step creates the registry entries that our install will (and will not) add to our WinXP...

in the "Bin" folder, create a new file called "java.reg"...

open "java.reg" with your text editor and paste the following, then save-and-exit -

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\JavaSoft\Java Update\Policy]
"EnableAutoUpdateCheck"=hex:01,00,00,00,d0,8c,9d,df,01,15,d1,11,8c,7a,00,c0,4f,\
c2,97,eb,01,00,00,00,9e,9b,bf,c2,27,b9,97,4f,9e,f0,76,37,a6,00,59,2b,00,00,\
00,00,1c,00,00,00,50,00,61,00,73,00,73,00,77,00,6f,00,72,00,64,00,20,00,44,\
00,61,00,74,00,61,00,00,00,10,66,00,00,00,01,00,00,20,00,00,00,dc,20,72,03,\
cd,3e,fb,cf,34,34,20,b4,69,52,58,ce,54,aa,93,6e,ed,44,31,b7,64,70,e3,1e,67,\
3a,81,c5,00,00,00,00,0e,80,00,00,00,02,00,00,20,00,00,00,19,16,10,6f,3a,80,\
e2,41,b7,60,ac,08,9b,3e,ca,86,ac,d8,6a,a2,ef,46,80,3b,ff,c8,f2,07,00,8c,23,\
a3,10,00,00,00,66,88,0e,7c,44,3c,ef,7b,ab,f0,2e,9a,87,17,34,48,40,00,00,00,\
6d,e8,dc,6a,1a,a5,5c,41,c5,d8,dc,6d,7d,c7,45,c3,3b,e5,57,d8,33,c5,ba,3c,9e,\
16,15,38,30,d7,1b,d0,93,b0,e0,24,9a,44,ba,39,c5,aa,e4,cc,71,53,8b,b2,ba,f8,\
e5,02,0d,d0,a5,be,e4,db,30,a0,aa,e4,5d,fc

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy]
"EnableAutoUpdateCheck"=dword:00000000
"EnableJavaUpdate"=dword:00000000
"NotifyDownload"=dword:00000000
"NotifyInstall"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"SunJavaUpdateSched"=-

your "Bin" folder should now only have THREE files in it...

SEVENTH...

Option 1 - "regular" install, no transferred 'settings'...

for this option, there is nothing to do for Step #7...

Option 2 - "transferred" 'settings'...

in the "Bin" folder, place the "deployment.properties" file that we originally copied to the desktop...

also in the "Bin" folder, extract the "nircmdc.exe" file from the downloaded 'nircmd.zip' file...

for Option 2 only, the "Bin" folder should now only have FIVE files in it, no folders...

EIGHTH...

we are now done with the "Bin" folder and we now jump out to the "Java6u19" folder for the rest of our process...

the "Java6u19" folder should currently have THREE files and the ONE folder (the "Bin" folder)...

we will be creating TWO more files to place in this folder, "Config.txt" and "Create.cmd"...

"Create.cmd" is the easiest of the two...

create a file called "Create.cmd" and open it in your text editor...

paste the following, save, then exit your text editor -

upx --ultra-brute 7zsd.sfx
cd Bin
..\7za a "..\Java6u19.7z" -r * -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on
cd ..
copy /b 7zsd.sfx + Config.txt + Java6u19.7z Java6u19.exe
del Java6u19.7z

'Java6u19.7z' is nothing but a TEMPORARY file that the process will end up deleting on its own...

'Java6u19.exe' is the name of your new fully silent unattended install executable...

now on to "Config.txt"...

NINTH - Config.txt...

still within the "Java6u19" folder, create a file called "Config.txt" and open in NOTEPAD, please...

i acknowledge that we all have our own "preferred" text editor and it might not be NOTEPAD, but for this step, just for the ease-of-it, i'm providing NOTEPAD instructions...

follow whichever option you chose in Step #7...

Option 1 - "regular" install, no transferred 'settings'...

paste the following into your "Config.txt" NOTEPAD file (but do not save yet) -

;!@Install@!UTF-8!
GUIMode="2"
RunProgram="jre1.6.0_19.msi /qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 SYSTRAY=0 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 MODIFYREMOVE=modify INSTALLDIR=C:\Programs\Java"
RunProgram="\"C:\\Programs\\Java\\bin\\jqs.exe\" -unregister"
RunProgram="regedit /s java.reg"
;!@InstallEnd@!

NOTE: this is basically what Kel uses with ONE EXCEPTION - he installs to "program files", i *avoid* the "program files" directory like the PLAGUE, just my "paranoia", lol...

in the above, we are installing to "C:\Programs\Java" - you can change this to your liking, be sure to change BOTH instances and maintain the single slashes for the first and the double slashes for the second...

Option 2 - "transferred" 'settings'...

paste the following into your "Config.txt" NOTEPAD file (but do not save yet) -

;!@Install@!UTF-8!
GUIMode="2"
RunProgram="jre1.6.0_19.msi /qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 SYSTRAY=0 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 MODIFYREMOVE=modify INSTALLDIR=C:\Programs\Java"
RunProgram="\"C:\\Programs\\Java\\bin\\jqs.exe\" -unregister"
RunProgram="regedit /s java.reg"
RunProgram="\"C:\\Programs\\Java\\bin\\javacpl.exe\""
RunProgram="nircmdc.exe wait 5000"
RunProgram="nircmdc.exe killprocess javaw.exe"
RunProgram="nircmdc.exe wait 2500"
RunProgram="cmd /c copy \"deployment.properties\" \"%APPDATA%\\Sun\\Java\\Deployment\\deployment.properties\""
;!@InstallEnd@!

NOTE: as in option 1, Kel installs to "program files" but i do not - you can edit the folder names if you prefer...

Option 1 AND 2 - NOT a "normal" save! - saving our "Config.txt" file...

whether you went with Option 1 or with Option 2, the "SPECIAL save" is the same...

in your NOTEPAD, pull down the "File" menu and click "Save As..."

there is an "encoding" pulldown (at the bottom) that defaults to "ANSI" - change this to UTF-8...

now save the file as "Config.txt" into your "Java6u19" folder (it will most likely NOT default to this folder)...

exit NOTEPAD...

TENTH...

click/double-click your "Create.cmd" file in the "Java6u19" folder...

a dos-box opens up and everything now is "self-propelled"...

sit back, whistle your favorite tune, it'll be done in a matter of seconds...

YOU'RE DONE! THAT'S IT!

There will be a new file called "Java6u19.exe" (unless you renamed it within "Create.cmd")...

This is your new silent install unattended executable file you can take to any computer you wish to install Java6u19 onto, settings and all if so inclined...

As an optional final step, feel free to pat yourself on the back...

You've especially earned it if this is your very first attempt at creating a silent unattended Java install executable...

Edited by WinCert-GuEsT

Share this post


Link to post
Share on other sites

Very thorough and easy to follow instructions. The only thing I didn't get was the optional second step regarding the "deployment.properties". What web site do you need to go to in order to create this and what exactly does it do? As far as I know I've never used this, and I go back before Java, so what purpose does it serve? Keep up the good work! We newbies, as far as creating Add-Ons are concerned, really appreciate it.

Cheers and Regards

Share this post


Link to post
Share on other sites

my apologies, i see i mispoke...

i see now that it is a Macromedia product that requires website access to change LOCAL settings (ie, prevent Flash from accessing your webcam [don't have one anyway, lol])...

Java does NOT require a visit to a website to change LOCAL settings - my apologies...

BUT that "deployment.properties" file IS still needed to transfer settings, a "set it ONCE and FORGET IT" approach, every new install reapplies your 'preferred settings' FOR YOU...

If after every Java install, the FIRST thing you do is go to the "Java Control Panel" and change a few settings, why not have your unattended silent install DO THAT STEP FOR YOU?

That's my case, i do *NOT* let Java "keep temporary files on my computer", so i UNCHECK that setting in the control panel and i'm on my merry way... by copying over the "deployment.properties" file, my new install does that UNCHECK *for me!* :)

apologies for the confusion...

good catch...

i just hope the "how to" isn't so "wordy" that newbies don't even give it a try, "thinking" it's above their heads...

it's really not as difficult as it might seem at first...

Share this post


Link to post
Share on other sites

Thanks for the clarification. You should probably re-edit the first post to keep the tutorial clear and concise in one post. Thanks again.

Cheers and Regards

Share this post


Link to post
Share on other sites

Just a quickie...

I have made the 32bit version of the silent install but as I am currently using a 32bit OS I cannot make the 64bit version. I have 7zipped and Universal extracted the 64bit exe but cannot find the msi or data1.cab file. Is it possible to make the 64 bit version on a 32bit OS?

Share this post


Link to post
Share on other sites

not sure...

i use the same process illustrated above to make an unattended silent install for VirtualBox...

i know for it, you can extract the .exe into its 'components' by executing "<filename.exe> -extract" in a command prompt dos box and for it, both the 32bit and the 64bit .msi is extracted to the temp folder (and i delete the 64bit .msi in that my 32bit silent install doesn't need it)...

Share this post


Link to post
Share on other sites

Hi WinCert-GuEsT

I was wondering if there is any way to check the setting is affected via java.reg after installation in XP. I mean not in registry editor but via the program GUI/CPL. Apparently I can't confirm after running the reg file, the setting is indeed applied. BTW, my own test shown

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"SunJavaUpdateSched"=-

is not required

Regards

Edited by Geej

Share this post


Link to post
Share on other sites

after your first reboot after your unattended silent install, you should *NOT* see "jqs.exe" in your process list when you do a ctrl-alt-del...

the other test is your firewall *NOT* flagging a hidden, behind the scenes, did-without-consent "autoupdate"...

there is NOTHING that erks my chain more than "software" that 'phones home for updates' WITHOUT MY CONSENT! without so much as an annoying pop-up box "i will now look online for an update, is this okay", nothing, it just checks "on it's own"...

Share this post


Link to post
Share on other sites

Thanks for the reply. I'm aware jqs.exe is not there in taskmanager, which I can verify.

Much as I share your sentiment that 'NOTHING that erks my chain more than "software" that 'phones home for updates' WITHOUT MY CONSENT!', there was no way I could verify this in any way...

I have decided not to use java.reg at this moment as I could not verify them.

Apparently, after applying the java.reg tweak to the installation, and go to control panel, launch Java.cpl. In Advanced tab, JRE Auto-Download listing, "Always Auto-Download" is still selected. :(

I look for ways to make it "Never Auto-Download" (see below screenshot) and decided to try your 2nd method, using deployment.properties. I found 2nd method works only on ROE. It wouldn't work on svcpack installation.

My deployment.properties contains only 1 line of text:

deployment.javaws.autodownload=NEVER

I also reduce console box appearing during installation by using nircmd.exe instead.

Hence my config.txt to run via RunOnceEx with default installation location is as follows:

;!@Install@!UTF-8!

GUIMode="2"

SetEnvironment="SUNAPPDATA=%APPDATA%\\Sun\\Java\\Deployment"

SetEnvironment="ROE=HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx"

RunProgram="jre1.6.0_19.msi /qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 SYSTRAY=0 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 MODIFYREMOVE=modify"

RunProgram="hidcon:cmd /c \"%programfiles%\\Java\\jre6\\bin\\jqs.exe\" -unregister"

RunProgram="hidcon:cmd /c md \"%SUNAPPDATA%\""

RunProgram="hidcon:cmd /c copy /Y \"deployment.properties\" \"%SUNAPPDATA%\""

RunProgram="\"%programfiles%\\Java\\jre6\\bin\\javacpl.exe"

RunProgram="hidcon:cmd /c ping -n 6 127.0.0.1"

RunProgram="nircmd win close title \"Java Control Panel\""

RunProgram="hidcon:cmd /c ping -n 2 127.0.0.1"

AutoInstall="hidcon:reg add \"%ROE%\"\\JRE /ve /d \"JRE 6.0.190.4\" /f"

AutoInstall="hidcon:reg add \"%ROE%\"\\JRE /v 1 /d \"%%S\\%%M\" /f"

;!@InstallEnd@!

Note: RunProgram="jre1.6.0_19.msi /qn ... bla bla bla ... MODIFYREMOVE=modify" is one single line

Bin folder contains 4 files:

Data1.cab

deployment.properties

jre1.6.0_19.msi

nircmd.exe

Entries_JRE.ini is use instead (no more silent exe)

[AddProgram]

Java6u19.exe -ai

(Below screenshot shown something I can verify visually with after installation)

Javaoption.png

At this moment, my JRE method is as above.

Any way to verify the 'phone home for update' thing is very much appreciated.

Thanks for the good informative post. deployment.properties is something new I didn't know. :D

Share this post


Link to post
Share on other sites

very interesting indeed, nice config.txt...

what's the benefit of ROE?

i just create unattended installs like the silent Java noted above or via AutoIt scripts and just set them to run via nLite's "[GuiRunOnce]"...

good point on the nircmd versus nircmdc...

i don't mind the unattended installs popping up a window or two (ALL of my AutoIt-scripted install do, lol)...

but yeah, many probably don't want to "see" ANYTHING for a "silent" install...

as for "verifying" there being *NO* phoning home, *NOTHING* on my computer goes out without Comodo Firewall v2.4.18.184 popping up an "allow or deny" confirmation... i "know" the autoupdate is fully disabled when i *NEVER* get a Comodo confirmation asking me if i want to allow Java access to the internet...

ie, it's Comodo's allow/deny that told me to revert to Kel's java.reg 'cause Comodo flagged an autoupdate (promptly DENIED) when i ran a different java.reg on a Vista and Win7 install... with Kel's java.reg, there is NO autoupdate being flagged by Comodo in XP, Vista, or Win7... that's always been verification enough for me :)

Share this post


Link to post
Share on other sites

what's the benefit of ROE?

A: JRE is install from CD. (no need copy to harddisk first). Slipstream as usual via svcpack. No need "[GuiRunOnce]"...

Also custom deployment.properties will stick if run from RunOnceEx. It will not stick if run at T13 with custom deployment.properties

Thanks for the info. I use only Windows firewall which explains why I can't see any thing being prompt.

I will just add java.reg to my build.

I may be wrong but the 'phone home thing' may be Java Web Start

Share this post


Link to post
Share on other sites

i'm still not catching the benefit of ROE...

i don't copy to harddisk first, my entire OS gets reinstalled every other month, if not EVERY month...

EVERYTHING is installed from a DVD, ALL settings, right down to remembered window positions, right down to desktop icon locations, EVERYTHING...

my Win XP is even "pre-authorized" - LEGAL Windows, i'll be dipped if i'm going to go to Microsoft's website and "authorize" my LEGAL Windows EVERY month just because i re-install EVERYTHING after every "update Tuesday"...

i pop the ALL-updates-slipstreamed DVD into the drive, reboot, i come back in an hour and EVERYTHING is installed (except firewall rules which "should" be reset every month anyway, lol)...

i guess i'm just trying to weigh the pros and cons of ROE and whether it would be to my "advantage" to convert several of my "[GuiRunOnce]" to ROE's - so far, i'm NOT seeing the "advantage"...

ps - Windows firewall, my kitchen sink offers me more 'net protection :D

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.


×
×
  • Create New...