/build/static/layout/Breadcrumb_cap_w.png

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?

0 Comments   [ + ] Show comments

Answers (7)

Posted by: NoDowt 13 years ago
Senior Yellow Belt
3
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.#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 11 years ago
Posted by: thegood1 13 years ago
Yellow Belt
1
m facing the same problem using this switch

msiexec /i jre1.6.0_23-c.msi /qn ALLUSERS=1 INSTALLLEVEL=100 RebootYesNo=No

It breaks :(
Posted by: anonymous_9363 13 years ago
Red Belt
1
RebootYesNo=NoNon-public properties passed on the command line are ignored. In any event, I don't think I've come across a single instance of JRE which required a reboot.
Posted by: NoDowt 13 years ago
Senior Yellow Belt
1
The quickest way i found around the double run bug this time was to write up a wrapper script (I used AutoIT) to check the file version of java.exe currently on the computer & not run the MSI if it was for the same version.
Posted by: chichora123 13 years ago
Fourth Degree Green Belt
1
NoDowt can you share the AutoIT script you are using. Thanks
Posted by: chichora123 13 years ago
Fourth Degree Green Belt
0
Wow this really helps Thank you NoDowt. In our environment we have a lot of users that are actually admins (power users) on the box & often a lot of time they install softwares & the updates manually. It's a significant challenge from an engineering prospective to look what they have already installed on thier machines & create a package accordingly. We don't really have a wrapper that we used around here and the delivery mechanism is not really efficient.

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
Senior Yellow Belt
0
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.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.
 
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