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.
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)
Please log in to answer
Posted by:
mekaywe
15 years ago
Posted by:
donaghs
15 years ago
Posted by:
donaghs
15 years ago
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.
I'll do further testing before I decide to inflict it on anyone else.
Posted by:
nheim
15 years ago
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
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
15 years ago
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
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.
so that the conversation will remain readable.