/build/static/layout/Breadcrumb_cap_w.png

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


0 Comments   [ + ] Show comments

Answers (4)

Posted by: Sweede 12 years ago
Second Degree Green Belt
2

When you install just set the property MODIFYREMOVE=remove

this will do the job

Posted by: jagadeish 12 years ago
Red Belt
1

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

Posted by: PowerCat 12 years ago
Senior Yellow Belt
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...

Posted by: dandirk 12 years ago
Third Degree Green Belt
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...

 
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