This shows you the differences between two versions of the page.
userspace:java [2012/04/18 07:21] Stone created |
userspace:java [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Java ====== | ||
- | Thanks to Der-Matze \\ | ||
- | Comments and improvements welcome \\ | ||
- | Tested with opsi 4.0.1 \\ | ||
- | Tested with opsi-winst 4.10.x - 4.11.1.6 \\ | ||
- | Tested with Windows XP Professional\\ | ||
- | |||
- | This script uses the check_msi-exitcode script: https:// | ||
- | |||
- | Uninstall.ins deinstalls all Versions of Java from 1.5.0.x until 1.6.0.31.\\ | ||
- | Because of the nesting of the subs, it is not possible to outsource the code in subuninstall.ins\\ | ||
- | |||
- | ===== install.ins ===== | ||
- | |||
- | |||
- | ===== uninstall.ins ===== | ||
- | |||
- | <code winst> | ||
- | [Initial] | ||
- | Message = Bitte warten, Java wird Deinstalliert | ||
- | setLogLevel = 6 | ||
- | ExitOnError = false | ||
- | ScriptErrorMessages = on | ||
- | TraceMode = off | ||
- | StayOnTop = false | ||
- | |||
- | [Actions] | ||
- | ;Variable for the OS | ||
- | DefVar $OS$ | ||
- | Set $OS$ = GetOS | ||
- | |||
- | ;Variable for the OS-subversion | ||
- | DefVar $NTVersion$ | ||
- | Set $NTVersion$ = GetNTVersion | ||
- | |||
- | ;Name of product (max. 12 columns) | ||
- | DefVar $ProductName$ | ||
- | Set $ProductName$ = " | ||
- | |||
- | ;filename of productpicture with extension | ||
- | DefVar $ProductPicture$ | ||
- | Set $ProductPicture$ = " | ||
- | |||
- | ;the variable for the ExitCode | ||
- | DefVar $ExitCode$ | ||
- | |||
- | ;show $ProductPicture$ and $ProductName$ | ||
- | ShowBitmap /3 " | ||
- | |||
- | |||
- | ;Variable for the msiexec-call for deinstallation | ||
- | DefVar $UninstallCommand$ | ||
- | |||
- | ;Variable for the current version. Will be read from registry. | ||
- | DefVar $DisplayName$ | ||
- | |||
- | ;Stingliste for the different Versions of Java | ||
- | DefStringList $version15$ | ||
- | DefStringList $version16_1$ | ||
- | DefStringList $version16_2$ | ||
- | set $version15$ = createStringList (' | ||
- | set $version16_1$ = createStringList (' | ||
- | ;there is no Java 1.6.0 Update 8 or 9 | ||
- | ;there are different Uninstall-Strings betweeen Version 10 and Version 20 (ends with F0) | ||
- | set $version16_2$ = createStringList (' | ||
- | ;Uninstall String (ends with FF) | ||
- | set $version16_3$ = createStringList (' | ||
- | |||
- | killtask " | ||
- | killtask " | ||
- | killtask " | ||
- | |||
- | for $x$ in $version15$ do sub_patch_uninstall_15 | ||
- | for $x$ in $version16_1$ do sub_patch_uninstall_16_1 | ||
- | for $x$ in $version16_2$ do sub_patch_uninstall_16_2 | ||
- | for $x$ in $version16_3$ do sub_patch_uninstall_16_3 | ||
- | |||
- | |||
- | [sub_patch_uninstall_15] | ||
- | ;Java 1.5.0.XX deinstallieren | ||
- | Set $DisplayName$ = GetRegistrystringvalue32(" | ||
- | if not ($DisplayName$ = "" | ||
- | Message " | ||
- | set $UninstallCommand$ = " | ||
- | Winbatch_Uninstall | ||
- | sub " | ||
- | endif | ||
- | |||
- | [Winbatch_Uninstall] | ||
- | $UninstallCommand$ | ||
- | |||
- | [sub_patch_uninstall_16_1] | ||
- | ;Java 1.6.0.XX deinstallieren | ||
- | Set $DisplayName$ = GetRegistrystringvalue32(" | ||
- | if not ($DisplayName$ = "" | ||
- | Message " | ||
- | set $UninstallCommand$ = " | ||
- | Winbatch_Uninstall | ||
- | sub " | ||
- | endif | ||
- | |||
- | |||
- | |||
- | [sub_patch_uninstall_16_2] | ||
- | ;Java 1.6.0.XX deinstallieren | ||
- | Set $DisplayName$ = GetRegistrystringvalue32(" | ||
- | if not ($DisplayName$ = "" | ||
- | Message " | ||
- | set $UninstallCommand$ = " | ||
- | Winbatch_Uninstall | ||
- | sub " | ||
- | endif | ||
- | |||
- | [sub_patch_uninstall_16_3] | ||
- | ;Java 1.6.0.XX deinstallieren | ||
- | Set $DisplayName$ = GetRegistrystringvalue32(" | ||
- | if not ($DisplayName$ = "" | ||
- | Message " | ||
- | set $UninstallCommand$ = " | ||
- | Winbatch_Uninstall | ||
- | sub " | ||
- | endif | ||
- | |||
- | |||
- | </ |