Java 6 Update 23 - 'Double Run' breaks install
Hi All,
I am currently facing some issues with deploying Java 6 Update 23...
I am using the MSI method to get around the problems using the EXE with x64 OSD deployment in SCCM, and am using a MST file to try to avoid the 'double run' bug causing a faulty installation reporting succesful (as noted previously on this forum).
However... I'm still getting the 'double run' bug breaking my installations... Argh!
This was working fine previously with U21 & U22... but its being difficult for U23..
Has anybody had any luck?
I am currently facing some issues with deploying Java 6 Update 23...
I am using the MSI method to get around the problems using the EXE with x64 OSD deployment in SCCM, and am using a MST file to try to avoid the 'double run' bug causing a faulty installation reporting succesful (as noted previously on this forum).
However... I'm still getting the 'double run' bug breaking my installations... Argh!
This was working fine previously with U21 & U22... but its being difficult for U23..
Has anybody had any luck?
0 Comments
[ + ] Show comments
Answers (7)
Please log in to answer
Posted by:
NoDowt
13 years ago
Here is a copy of my AutoIT script. Figured I'd post the code rather than the compiled exe so you can ensure there is nothing malicious in there & also adjust to suite your environment.
When running, the script will get the file version of java.exe currently installed, compare that to the 'Version' info from the ini file. If matches the script will exit, otherwise it'll then run the provided MSI file with a bunch of options (including verbose logging to c:\temp). After that it will uninstall the JQS & AutoUpdate componants if they are found on the system.
Hope this helps others.
#Region ###### Script Header, please enter details about your script here ################
;AutoIt Version: 3.3.6.1
;Author: Jason Hall - jhall@teacherscreditunion.com.au
;Date: 11/01/2011
;Script Function: Checks if current version of java is installed before running java installation.
#NoTrayIcon ;Disables AutoIT tray icon
#RequireAdmin ;Force UAC Prompt for admin rights
#EndRegion ### End of Script Header #######################################################
#Region ###### Enter your script here #####################################################
;Get Installed java.exe version & version to be installed & installer filename
$JavaInstalled = FileGetVersion( @ProgramFilesDir & "\Java\jre6\bin\java.exe")
$JavaNew = IniRead( @ScriptDir & "\JavaInstall2.ini", "Data", "Version", "")
$JavaMSI = IniRead( @ScriptDir & "\JavaInstall2.ini", "Data", "MSI", "")
;Exits script if versions match
If $JavaInstalled = $JavaNew Then Exit
;Runs Installer
RunWait('msiexec.exe /i "' & @ScriptDir & '\' & $JavaMSI & '.msi" REBOOT=Suppress IEXPLORER=1 MOZILLA=1 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 SYSTRAY=0 /qb /l*vx "C:\temp\' & $JavaMSI & '.log"')
;Remove JQS if present
If FileExists(@ProgramFilesDir & "\Java\jre6\bin\jqs.exe") Then RunWait( @ProgramFilesDir & "Java\jre6\bin\jqs.exe -unregister")
;Uninstall Java Auto Update
If FileExists(@ProgramFilesDir & "\Java\jre6\bin\jusched.exe") Then RunWait( "msiexec /qb /x {4A03706F-666A-4037-7777-5F2748764D10}")
#EndRegion ### End of your script #########################################################
Exit
Along side the compiled script, you will need the JRE msi file, data1.cab & an ini file (JavaInstall2.ini in my case, you can adjust the script if you like) with the following data[Data]
MSI=jre1.6.0_23
Version=6.0.230.5
Where MSI is the name of the actual MSI file (minus the '.msi'), and Version is the file version of the new java.exe.When running, the script will get the file version of java.exe currently installed, compare that to the 'Version' info from the ini file. If matches the script will exit, otherwise it'll then run the provided MSI file with a bunch of options (including verbose logging to c:\temp). After that it will uninstall the JQS & AutoUpdate componants if they are found on the system.
Hope this helps others.
Comments:
-
Nice script! Depending on what you want to happen if a later version of Java exists, you could either uninstall the later version and install 6.0.23, or exit the script if the same or a later version of Java exists. - ibroadbent 12 years ago
Posted by:
thegood1
13 years ago
Posted by:
anonymous_9363
13 years ago
Posted by:
NoDowt
13 years ago
Posted by:
chichora123
13 years ago
What i was thinking insteads of telling the script not to install maybe i can have it to look for the Product code of jre 23 {26A24AE4-039D-4CA4-87B4-2F83216023FF} & uninstall if it's already exist.
I am going to play with the script since this is my first time using AutoIT but i will appreciate if you have any suggestions or maybe a line that i can add to your script. Thanks is advance
Posted by:
NoDowt
13 years ago
AutoIT is quite powerful once you get into it... I've only really scratched the surface myself when you see what some people are doing with it...
I did purchase an ebook from oreilly media to try to help learn it, it was pretty basic though... I've picked up much more just by looking at others scripts on the AutoIT forums & from the built in help file.
If you want to search the registry for that product code, you could use an IF statement with the RegRead command to check for the product?
e.g.
I did purchase an ebook from oreilly media to try to help learn it, it was pretty basic though... I've picked up much more just by looking at others scripts on the AutoIT forums & from the built in help file.
If you want to search the registry for that product code, you could use an IF statement with the RegRead command to check for the product?
e.g.
If RegRead( "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216023FF}", "UninstallString") = "" Then
;Do something if the above key doesn't exist
Else
;Do something else if they adove key exists
EndIf
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.