Code

source: oracle.java745/CLIENT_DATA/setup32.ins @ 14bf43

Revision 14bf43, 3.9 KB checked in by Dennis Trinks <dennis.trinks@…>, 6 years ago (diff)

cleaned, unistallscript old java versions, testing

  • Property mode set to 100644
Line 
1; Copyright (c) uib gmbh (www.uib.de)
2; This sourcecode is owned by uib
3; and published under the Terms of the General Public License.
4; credits: http://www.opsi.org/credits/
5
6[Actions]
7requiredWinstVersion >= "4.10.8.6"
8
9DefVar $MsiId$
10DefVar $UninstallProgram32$
11DefVar $LogDir$
12DefVar $ProductId$ 
13DefVar $MinimumSpace$
14DefVar $ExitCode$
15DefVar $LicenseRequired$
16DefVar $LicenseKey$
17DefVar $LicensePool$
18DefVar $InstallPlugins$
19
20set $InstallPlugins$ = "IEXPLORER=1 MOZILLA=1"
21
22Set $LogDir$ = "%SystemDrive%\tmp"
23
24; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
25; and adds the following variables:
26;   from builder-product.cfg :  all variables definded by attribute WINST[index]
27;   from builder-product.cfg :  VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE   
28;   from opsi-builder.cfg    :  CREATOR_TAG CREATOR_NAME CREATOR_EMAIL           
29;   auto generated winst-variables
30;         $IconFile$: path to product picture
31;
32@@BUILDER_VARIABLES@@
33
34; ----------------------------------------------------------------
35; - Please edit the following values                             -
36; ----------------------------------------------------------------
37;$ProductId$ should be the name of the product in opsi
38; therefore please: only lower letters, no umlauts,
39; no white space use '-' as a seperator
40Set $ProductId$       = "java745"
41Set $MinimumSpace$    = "1 MB"
42; the path were we find the product after the installation
43Set $LicenseRequired$ = "false"
44Set $LicensePool$     = "p_" + $ProductId$
45; ----------------------------------------------------------------
46
47if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
48        LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
49        isFatalError
50        ; Stop process and set installation status to failed
51else
52        comment "Show product picture"
53        ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
54       
55        if FileExists("%ScriptPath%\delsub32.ins")
56                comment "Start uninstall sub section"
57                Sub "%ScriptPath%\delsub32.ins"
58        endif
59       
60        if $LicenseRequired$ = "true"
61                comment "Licensing required, reserve license and get license key"
62                Sub_get_licensekey
63        endif
64       
65        comment "installing"
66        Message "Installing " + $ProductId$ + " 32 Bit..."
67        comment "Start setup program"
68        dosinanicon_install
69        Winbatch_java_install
70        Sub_check_exitcode
71endif   
72
73[Sub_check_exitcode]
74comment "Test for installation success via exit code"
75set $ExitCode$ = getLastExitCode
76if ($ExitCode$ = "0")
77        comment "Looks good: setup program gives exitcode zero"
78else
79        comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
80        if ($ExitCode$ = "1605")
81                comment "ERROR_UNKNOWN_PRODUCT  1605    This action is only valid for products that are currently installed."
82                comment "Uninstall of a not installed product failed - no problem"
83        else
84                if ($ExitCode$ = "1641")
85                        comment "looks good: setup program gives exitcode 1641"
86                        comment "ERROR_SUCCESS_REBOOT_INITIATED 1641    The installer has initiated a restart. This message is indicative of a success."
87                else
88                        if ($ExitCode$ = "3010")
89                                comment "looks good: setup program gives exitcode 3010"
90                                comment "ERROR_SUCCESS_REBOOT_REQUIRED  3010    A restart is required to complete the install. This message is indicative of a success."
91                        else
92                                logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
93                                isFatalError
94                        endif
95                endif
96        endif
97endif
98
99[dosinanicon_install]
100taskkill /f /im iexplore.exe /t
101
102[Winbatch_java_install]
103"$Install32Exe$" /s /v "/qb-! ADDLOCAL=ALL $InstallPlugins$  REBOOT=ReallySuppess SYSTRAY=0 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0"
Note: See TracBrowser for help on using the repository browser.