oracle.java745/CLIENT_DATA/subdeljava.ins

251 lines
10 KiB
TeX

; custom specific stuff
if FileExists("%ScriptPath%\custom_ins_dir\prevent_uninstall.ins")
sub "%ScriptPath%\custom_ins_dir\prevent_uninstall.ins"
endif
LinkFolder_Webstart_delete
;JavaVM 1.6.0
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3248F0A8-6813-11D6-A77B-00B0D0160000}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160000} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_1
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3248F0A8-6813-11D6-A77B-00B0D0160010}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160010} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_2
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3248F0A8-6813-11D6-A77B-00B0D0160020}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160020} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_3
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3248F0A8-6813-11D6-A77B-00B0D0160030}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160030} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_4
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3248F0A8-6813-11D6-A77B-00B0D0160040}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160040} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_5
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3248F0A8-6813-11D6-A77B-00B0D0160050}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160050} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_6
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3248F0A8-6813-11D6-A77B-00B0D0160060}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160060} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_7
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3248F0A8-6813-11D6-A77B-00B0D0160070}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {3248F0A8-6813-11D6-A77B-00B0D0160070} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_11
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216011FF}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216011FF} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_12
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216012FF}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216012FF} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_13
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216013FF}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216013FF} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_14
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216014FF}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216014FF} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_15
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216015FF}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216015FF} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_16
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216016FF}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216016FF} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_17
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216017FF}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216017FF} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_18
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216018FF}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216018FF} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_19
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216019FF}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216019FF} /qb-! REBOOT=ReallySuppress"
Winbatch_sun_uninstall
Sub_check_exitcode
endif
;JavaVM 1.6.0_20
set $DisplayName$ = GetRegistryStringValue ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216020FF}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83216020FF} /qb-! REBOOT=ReallySuppress"
;Winbatch_sun_uninstall /WaitForProcessEnding "msiexec.exe" /TimeOutSeconds 300
sub_deinstall_with_retry
Sub_check_exitcode
endif
set $DisplayName$ = GetRegistryStringValue64 ("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F86416020FF}] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
set $UninstallCommand$ = "MsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F86416020FF} /qb-! REBOOT=ReallySuppress"
sub_deinstall_with_retry
Sub_check_exitcode
;sleepSeconds 30
endif
[sub_deinstall_with_retry]
Winbatch_sun_uninstall
set $ExitCode$ = getLastExitCode
if $ExitCode$ = "1618"
sleepSeconds 10
Winbatch_sun_uninstall
set $ExitCode$ = getLastExitCode
if $ExitCode$ = "1618"
sleepSeconds 10
Winbatch_sun_uninstall
set $ExitCode$ = getLastExitCode
if $ExitCode$ = "1618"
sleepSeconds 10
Winbatch_sun_uninstall
set $ExitCode$ = getLastExitCode
if $ExitCode$ = "1618"
sleepSeconds 10
Winbatch_sun_uninstall
set $ExitCode$ = getLastExitCode
if $ExitCode$ = "1618"
sleepSeconds 10
Winbatch_sun_uninstall
endif
endif
endif
endif
endif
[Winbatch_sun_uninstall]
$UninstallCommand$
[LinkFolder_Webstart_delete]
set_basefolder common_programs
delete_subfolder "Java"
delete_subfolder "Java Web Start"
[DosInAnIcon_test_16_installation]
@echo off
"java.exe" -version
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif