/build/static/layout/Breadcrumb_cap_w.png

Sun Java for Vista

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

Answers (5)

Posted by: mekaywe 14 years ago
Brown Belt
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
Posted by: donaghs 14 years ago
Senior Yellow Belt
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?
Posted by: donaghs 14 years ago
Senior Yellow Belt
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.
Posted by: nheim 14 years ago
10th Degree Black Belt
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
Posted by: john.staiert 14 years ago
Yellow Belt
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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