I use AutoITv3 script and when it goes to install the Java6 update 35, it does not uninstall the previous Java versions. (script included)
Deploying Java6 update 35. I use AutoITv3 script and when it goes to install the Java6 update 35, it does not uninstall the previous Java versions. I have included my script from AutoItv3 below. I need help. Here is my script
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=JRE6_35.exe
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#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.
#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 & "\JavaInstall.ini", "Data", "Version", "")
$JavaMSI = IniRead( @ScriptDir & "\JavaInstall.ini", "Data", "MSI", "")
;Exits script if versions match
If $JavaInstalled = $JavaNew Then Exit
;Remove JQS if present
If FileExists(@ProgramFilesDir & "\Java\jre6\bin\jqs.exe") Then RunWait( @ProgramFilesDir & "Java\jre6\bin\jqs.exe -unregister")
;Runs Installer
RunWait('msiexec.exe /i "' & @ScriptDir & '\' & $JavaMSI & '.msi" REBOOT=Suppress IEXPLORER=1 MOZILLA=1 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 SYSTRAY=0 /qb')
;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
Answers (4)
What happens when you manually run the script (mimicing same commands etc without autoit)? Does it upgrade properly?
BTW... Uninstalling AU is slick, but the uninstall will error out with a 1603 error on Win7. Though it seems to perform most of the uninstall steps, resulting pretty much what you want. Just FYI for reporting etc. We had to go another route basically due to reports showing tons of this failure (but everything was fine). I am guessing you avoid most of that with your autoit wrapper...