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

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

2

When you install just set the property MODIFYREMOVE=remove

this will do the job

Answered 09/07/2012 by: Sweede
Second Degree Green Belt

Please log in to comment

Answers

1

Copy the value of UninstallString and execute it with /qb!

Answered 09/11/2012 by: jagadeish
Red Belt

Please log in to comment
1

What happens when you type "msiexec /qb /x {4A03706F-666A-4037-7777-5F2748764D10}" in the Run box?

It's possible that's not the right GUID for that version...

Answered 09/07/2012 by: PowerCat
Senior Yellow Belt

Please log in to comment
0

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...

Answered 09/10/2012 by: dandirk
Third Degree Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity