Hi, only 2nd time posting here, but hope someone can help with a query. I've ready previous similar posts but can't find the right answer.

Basically, all my Vista PCs have a particular version of Java on them. After hearing about a security vulnerability I want to upgrade the version of Java on every PC to "version 6, update 17". I want to automate this process and push it out silently.

The most successful way of doing this is to manually go to the Sun website and download and and install the update. This works, although it create the autoupdate which I don't want.

I have not found a successful way to automate this though. I have found commands which do this, e.g.
jre-6u17-windows-i586-s.exe /s /v"/qn IEXPLORER=1 REBOOT=Suppress JAVAUPDATE=0"
but these leave the previous version of Java installed. Apart from looking messy, I presume there is still the vulnerability?

I've also managed to unsintall the previous version first with a batch file, but this also leaves behind an icon in Control Panel for a version of Java which no longer exists. Presumably some reg keys get left behind which also need to be deleted. I feel like I could spend weeks trying to tweak this one install/upgrade.

Does anyone know a simple way to correctly upgrade the Java version on Vista, in an automated fashion?[:(] And if possible removing the autoupdate feature.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
JRE is designed such that different versions of JRE can co-exist. There is no harm if you have 2 versions installed on the same machine.

You can control autoupdates using this registry hive HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy
Answered 11/20/2009 by: mekaywe
Brown Belt

Please log in to comment
0
Thanks Mekaywe. But if the older version has a vulnerability, does this mean that the PC is still exposed to that danger if the older version remains alongside the newer one?
Answered 11/20/2009 by: donaghs
Senior Yellow Belt

Please log in to comment
0
I came up my own messy solution in the end. Using a KIX script, I launch a batch file to uninstall the current version, followed by another batch file the install the newer version. Then the KIX script modifies registry locations to stop the autoupdate.

I'll do further testing before I decide to inflict it on anyone else.
Answered 11/20/2009 by: donaghs
Senior Yellow Belt

Please log in to comment
0
Hi donags,
important to know: Sun changed the behaviour of its JRE installer as of v 1.6.10.
If you have older JRE's installed on your boxes, you have to actively remove them, otherwise they will remain installed.
The newer versions upgrade/patch previous installations.
See: http://java.sun.com/javase/6/docs/technotes/guides/jweb/otherFeatures/jre_install.html
And: http://itninja.com/link/download-here , Links section.
Regards, Nick
Answered 11/22/2009 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Here is a copy of a VBS script we incorperated into a TS to run 3 times before installing the new version of Java we want. This will remove any previous versions from the target machine. This holds true for any application installed as long as it has an installation GUID in the registry. To modify this script, you only need to change the value in const AppName = " "

Hope this helps.



'Remove Java
'vbscript
On Error Resume Next

'**********************************************************************
const AppName = "Java"
'**********************************************************************

const HKEY_LOCAL_MACHINE = &H80000002

Set WshShell = WScript.CreateObject("WScript.Shell")

'First, find the GUID
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
InstalledAppName = ""
InstalledAppName = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName")

If InStr(InstalledAppName, AppName) > 0 then
RawGUID = ""
GUID = ""
RawGUID = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\UninstallString")
GUID = Mid(RawGUID, instr(RawGUID, "{"), 38)
If GUID<>"" then
' Found matching GUID, removing...
WshShell.Run "msiexec /x " & GUID & " /q"
Exit For
End If
End If
Next
Answered 11/23/2009 by: john.staiert
Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity