User Tools

Site Tools


userspace:java-ng

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
userspace:java-ng [2014/04/17 10:46]
Kevin W.
userspace:java-ng [2021/08/23 08:37] (current)
Line 1: Line 1:
-====== Java-NG ======+====== Java 8 (EOL) ======
 **Feel free to contact me :)** **Feel free to contact me :)**
  
-Tested with Opsi 4.0.4.5\\ +Tested with Debian 9\\ 
-Tested with Windows 7 Enterprise x64/x32, 8 Enterprise x648.1 Pro x64, Server 2003 SP2 x32\\ +Tested with Opsi 4.0.7.45\\ 
-Tested with Java 6u10 - 8u5\\ +Tested with Winst 4.11.6.12\\ 
-requiredWinstVersion >= 4.11.3\\ +Tested with Server 2016 x64\\ 
-By [[Kevin.Weis@faw.de|Kevin Weis]] 2014-04-17\\+Tested with 10 Enterprise x64\\ 
 +Tested with 8.1 Pro x64\\ 
 +Tested with 7 Pro x64\\ 
 +Tested with 7 Pro x86\\ 
 +requiredWinstVersion >= 4.11.5\\
  
-Download: [[https://dl.dropboxusercontent.com/u/27159788/static/java_1.8.0.05.13-4.1.opsi | All in one - installable opsi package (~ 985 MiB)]]+**This package will not receive any updates**
  
-For an altanative, you can download only the parts you want to support; **see [[ #Custom install instuctions]]**\\ +Download: [[https://compilenix.org/public/opsi/localboot/java/java_1.8.0.202-4.2.5.opsi | All in one - installable opsi package]]\\ 
-Download: [[https://dl.dropboxusercontent.com/u/27159788/static/java_1.8.0.05.13-4.1_script.opsi | Without setup binary´s - installable opsi package (~ 29 KiB)]]\\ +Checksum's and detached pgp signatures: https://compilenix.org/public/opsi/localboot/java/
-Download[[https://dl.dropboxusercontent.com/u/27159788/static/java_1.8.0.05.13.7z | Setup binary´s - Java 8 (~ 516 MiB)]]\\ +
-Download: [[https://dl.dropboxusercontent.com/u/27159788/static/java_1.7.0.55.13.7z | Setup binary´s - Java 7 (~ 430 MiB)]]\\+
  
 +Source Code: [[https://git.compilenix.org/Compilenix/opsi-java | Code repository]]\\
 +Check if you have the JCE installed: [[https://compilenix.org/public/opsi/jceCheck.jar | jceCheck.jar]] [[https://compilenix.org/public/opsi/jceCheck.jar.asc | (detached pgp signature)]]\\
  
-Download[[https://dl.dropboxusercontent.com/u/27159788/static/Winst.xml | my Notepad++ Syntax Highlighting]]+All downloads are pgp signed with:\\ 
 +Compilenix <Compilenix@compilenix.org>\\ 
 +Validity: from 2015-01-09 11:29 until forever or revoked\\ 
 +Certificate type: 4,096-bit RSA\\ 
 +Key-ID: E763633D\\ 
 +Fingerprint: CC6047FA5B4449F28940636910B6666EE763633D\\ 
 +https://compilenix.org/public/certificates/pgp/compilenix%40compilenix.org%20%280xE763633D%29.asc
  
-<code> +Downloadmy [[https://compilenix.org/public/opsi/Winst.xml Notepad++ Syntax Highlighting]]\\ 
-Tree: +Download: my [[https://marketplace.visualstudio.com/items?itemName=Compilenix.winst Visual Studio Code Syntax Highlighting]]
-|-- setup_data +
-|   |-- msi +
-|     |-- jdk1.7.0_55 +
-  |     |-- sha1sum.txt +
-|       |-- sj170550.cab +
-|       |-- ss170550.cab +
-|       |-- st170550.cab +
-  |     `-- sz170550.cab +
-|     |-- jdk1.8.0_05 +
-|       |-- jdk1.8.0_05.msi +
-|       |-- sha1sum.txt +
-|       |-- sj180050.cab +
-|       |-- ss180050.cab +
-|       |-- st180050.cab +
-|       `-- sz180050.cab +
-|     |-- jre1.7.0_55 +
-|       |-- Data1.cab +
-|       |-- jre1.7.0_55.msi +
-|       |-- jre1031.MST +
-|       `-- sha1sum.txt +
-|     `-- jre1.8.0_05 +
-|         |-- Data1.cab +
-|         |-- jre1.8.0_05.msi +
-|         |-- jre1031.MST +
-|         `-- sha1sum.txt +
-|   |-- jdk-7u55-windows-i586.exe +
-|   |-- jdk-7u55-windows-x64.exe +
-|   |-- jdk-8u05-windows-i586.exe +
-|   |-- jdk-8u05-windows-x64.exe +
-|   |-- jre-7u55-windows-i586.exe +
-|   |-- jre-7u55-windows-x64.exe +
-|   |-- jre-8u05-windows-i586.exe +
-|   |-- jre-8u05-windows-x64.exe +
-|   |-- License.txt +
-|   |-- License.url +
-|   `-- sha1sum.txt +
-|-- UnlimitedJCEPolicy +
-|   |-- JCE_PATCHED +
-|   |-- local_policy.jar +
-|   |-- README.txt +
-|   |-- sha1sum.txt +
-|   `-- US_export_policy.jar +
-|-- check_msi-exitcode.ins +
-|-- check_uninstall.ins +
-|-- delsub.ins +
-|-- java.png +
-|-- setup.ins +
-|-- sha1sum.txt +
-|-- Sub_UpdateVariables.ins +
-`-- uninstall.ins +
-</code>+
  
-==== What is does, and what not ====+===== What it does, and what not =====
  It Does:  It Does:
-  - Handle install and uninstall of: x64 and x86, JRE of Java 1.6.0.10 until 1.8.0.05, JDK of Java 1.7.0.0 until 1.8.0.05 +  - Handle install: x64 and x86, JRE and JDK 
-  - Installation of Java 7 or Java 8 +  - Handle uninstall: x64 and x86, JRE of Java 1.6.0.10 until 1.8.0.151, JDK of Java 1.7.0.0 until Java 8u202 
-  - Add the JCE Patch to every Java installation; see: [[http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html | JCE Documentation]] +  - Installation of Java 8 
-  - Use the check_msi-exitcode script from "Der-Matze": [[userspace:check_msi-exitcode]]+  - Add the JCE Patch to every Java installation; see: [[https://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html | JCE Documentation]] 
 +  - Use the check_msi-exitcode script from "Der-Matze": [[userspace:check_msi-exitcode]] (modified)
  
  It Does NOT:  It Does NOT:
   - Uninstall Java versions older then 1.6.0.10, because in update 10 was a new installer dropped which uses an other schema of GUID´s at the Windows Registry   - Uninstall Java versions older then 1.6.0.10, because in update 10 was a new installer dropped which uses an other schema of GUID´s at the Windows Registry
   - Uninstall Java JDK`s older then 1.7.0.0   - Uninstall Java JDK`s older then 1.7.0.0
 +  - Un-/Install Java 9
  
-==== Notes ====+===== Notes =====
 The package includes the MSI installer for the JRE and JDK x86, because if you want to install Java JRE/JDK x86 on a x64 System the EXE installer will "crash" if it was called in a SYSTEM user context. Calling it by hand will work and my package is designed to manage both cases. The package includes the MSI installer for the JRE and JDK x86, because if you want to install Java JRE/JDK x86 on a x64 System the EXE installer will "crash" if it was called in a SYSTEM user context. Calling it by hand will work and my package is designed to manage both cases.
  
Line 93: Line 54:
 This happends only on x64 System`s. My package will ever prefer of using the EXE installer, the MSI files were only called in a fallback case!\\ This happends only on x64 System`s. My package will ever prefer of using the EXE installer, the MSI files were only called in a fallback case!\\
  
-==== Custom install instuctions ==== +===== TODO ===== 
-If you want to support Java or Java 7but not both of them, you can download the installable opsi package without setup binary´s, install the package and then download an extract the setup binary´s into "%ScriptPath%\setup_data\".+  - Add feature; Install X.509 (root) Certificates into the Java Certificate chain. 
 +  - Change uninstall procedure using WMCI or Powershellto avoid generating wrong uninstall strings. (Thanks Andreas) 
 +  - Nothing else at the moment.. If you have any suggestions, let me know :)
  
-==== Change Log ====+===== Product Properties =====
 <code> <code>
-java (1.8.0.05.13-4.1) urgency=high 
-  -- Kevin Weis <kevin.weis@faw.de> 2014-04-17 
-  * update 
-  * add JRE and JDK of Java 7 (ProductProperty "Version") 
-  * add discriptions to all ProductPropertys 
-  * change default of ProductProperty "VM-Type" from "jdk" to "jre" (if winst script is called by hand "jdk" is the default) 
-  * change default of ProductProperty "WebJava-Security_Level" from "M" to "VH" 
-  * NOTE: I´m using the JCE patch for Java 8, this work for Java 7 too (tested, no unwanted behaviour with SHA384, SHA512 and AES192, AES256) 
-  Minor changes: 
-    * Apply new variables nomination 
-    * Fix check for minnimum Microsoft Windows Version (Java 8 is not supported on Windows XP, minnimum is Windows Vista >= 6.0) 
-    * If some fatal error occours, the error will now be displayed (as a Message), too. 
-    * clean up check_msi-exitcode; remove dead code and display fatal errors. 
-    * automate get last version of Java 7 and 8 (StringList) 
-</code> 
-For those people which are intrested in a diff file: [[https://dl.dropboxusercontent.com/u/27159788/static/java_1.8.0-3.1.diff | java_1.8.0-3.1.diff]]\\ 
- 
-==== TODO ==== 
-  - Add support for in-/de-installation of JavaFX 
- 
- 
-===== control ===== 
-<code winst control.txt> 
-[Package] 
-version: 4.1 
-depends:  
-incremental: False 
- 
-[Product] 
-type: localboot 
-id: java 
-name: Java 
-description:  
-advice:  
-version: 1.8.0.05.13 
-priority: -95 
-licenseRequired: False 
-productClasses:  
-setupScript: setup.ins 
-uninstallScript: uninstall.ins 
-updateScript:  
-alwaysScript:  
-onceScript:  
-customScript:  
-userLoginScript:  
- 
 [ProductProperty] [ProductProperty]
 type: unicode type: unicode
-name: version+name: vm-type
 multivalue: False multivalue: False
 editable: False editable: False
-description: Install Java 7 or 8+description: Install the Development Kit (JDK) or just the Java Runtime (JRE)
-values: ["7", "8"] +values: ["jdk", "jre"] 
-default: ["8"]+default: ["jre"]
  
 [ProductProperty] [ProductProperty]
 type: unicode type: unicode
-name: vm-type+name: patchjce
 multivalue: False multivalue: False
 editable: False editable: False
-description: Install the Development Kit (JDK) or just the Java Runtime (JRE+description: Apply patch For JCE (Java Cryptography Extension); see also: https://en.wikipedia.org/wiki/Java_Cryptography_Extension 
-values: ["jdk", "jre"] +values: ["Off", "On"] 
-default: ["jre"]+default: ["On"]
  
 [ProductProperty] [ProductProperty]
Line 185: Line 102:
 multivalue: False multivalue: False
 editable: False editable: False
-description: Toggle the Java-Updater and Update-Notifications+description: Toggle the Java-Updater and Update-Notifications.
 values: ["Off", "On"] values: ["Off", "On"]
 default: ["Off"] default: ["Off"]
  
-[Changelog]+[ProductProperty] 
 +type: unicode 
 +name: 32bitonly 
 +multivalue: False 
 +editable: False 
 +description: Toggle if on a 64bit OS only the 32bit JRE/JDK will be installed. 
 +values: ["False", "True"
 +default: ["False"
 + 
 +[ProductProperty] 
 +type: unicode 
 +name: 64bitonly 
 +multivalue: False 
 +editable: False 
 +description: Toggle if on a 64bit OS only the 64bit JRE/JDK will be installed. 
 +values: ["False", "True"
 + 
 +[ProductProperty] 
 +type: unicode 
 +name: updatebranch 
 +multivalue: False 
 +editable: False 
 +description: Toggle between Critical Patch Update (CPU) and Patch Set Update (PSU) 
 +values: ["CPU", "PSU"
 +default: ["CPU"
 + 
 +</code> 
 + 
 +===== Changelog ===== 
 +<code control.txt> 
 +java (1.8.0.202-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2018-01-16 
 +  * update 
 + 
 +java (1.8.0.192-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2018-10-26 
 +  * update 
 + 
 +java (1.8.0.181-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2018-07-18 
 +  * update 
 + 
 +java (1.8.0.172-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2018-04-18 
 +  * update 
 + 
 +java (1.8.0.162-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2018-01-24 
 +  * update 
 + 
 +java (1.8.0.152-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2017-10-26 
 +  * update 
 + 
 +java (1.8.0.144-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2017-09-05 
 +  * update 
 + 
 +java (1.8.0.141-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2017-07-20 
 +  * update 
 + 
 +java (1.8.0.131-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2017-04-24 
 +  * update 
 + 
 +java (1.8.0.121-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2017-01-17 
 +  * update 
 + 
 +java (1.8.0.112-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2016-10-23 
 +  * update 
 + 
 +java (1.8.0.102-4.2.5) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2016-07-25 
 +  * update 
 +  * update/create symbolic links at C:\ProgramData\Oracle\Java\javapath\. prefering x64 jre if possible. 
 + 
 +java (1.8.0.92-4.2.4) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2016-05-03 
 +  * update 
 + 
 +java (1.8.0.77.3-4.2.4) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2016-03-30 
 +  * update 
 + 
 +java (1.8.0.74.2-4.2.4) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2016-03-14 
 +  * update 
 + 
 +java (1.8.0.72.15-4.2.4) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2015-10-26 
 +  * update 
 +  * add Product "updateBranch" choose between 8u71 and 8u72 (more info: http://www.oracle.com/technetwork/java/javase/cpu-psu-explained-2331472.html) 
 +  * add Product Property "64bitonly" (default: False) 
 + 
 +java (1.8.0.66.17-4.2.3) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2015-10-26 
 +  * update 
 + 
 +java (1.8.0.60.27-4.2.3) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2015-09-09 
 +  * update 
 + 
 +java (1.8.0.51.16-4.2.3) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2015-07-20 
 +  * update 
 + 
 +java (1.8.0.45.14-4.2.3) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2015-04-15 
 +  * update 
 + 
 +java (1.8.0.40.26-4.2.3) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2015-03-19 
 +  * fixed: installation of Java JRE x86 on a x64 OS does not work (exit code 3) 
 + 
 +java (1.8.0.40.26-4.2.2) 
 +  -- Kevin Weis <Compilenix@compilenix.org> 2015-03-16 
 +  * update 
 + 
 +java (1.8.0.31.13-4.2.2) 
 +  -- Kevin Weis <kevinweis@gmx.de> 2015-01-21 
 +  * update 
 + 
 +java (1.8.0.25.18-4.2.2) 
 +  -- Kevin Weis <kevinweis@gmx.de> 2014-10-20 
 +  * update 
 +  * add ProductProperty "PatchJCE"; see also: https://en.wikipedia.org/wiki/Java_Cryptography_Extension and http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html 
 +  * Java 7 setup support droped (uninstalling of future Java 7 versions are still supported) 
 + 
 +java (1.8.0.11.12-4.2.1) 
 +  -- Kevin Weis <kevinweis@gmx.de> 2014-08-14 
 +  * update; Java 1.0.7.65 build 19 to 1.0.7.67 build 1 
 + 
 +java (1.8.0.11.12-4.2) 
 +  -- Kevin Weis <kevinweis@gmx.de> 2014-07-21 
 +  * update; Java 1.0.7.60 build 19 to 1.0.7.65 build 19 
 + 
 +java (1.8.0.05.13-4.2) 
 +  -- Kevin Weis <kevinweis@gmx.de> 2014-06-14 
 +  * update; Java 1.0.7.55 to 1.0.7.60 build 19 
 +  * add ProductProperty "32bitOnly". The functionality of this option will be extended with the next Java 8 update. 
 +  * since this update (Java 7u60 JRE x64/x86) the MSI-GUID has changed at one charcter (from "8" to "0"), no idea why -> ask Oracle -.- (see "check_uninstall.ins" from line 69 - 74) 
 +  Minor changes: 
 +    * add killing Opera.exe, before in-/uninstall. 
 +    * little Bug-fix which caused an installation abort with the (expected at this point) error code 1619. 
 java (1.8.0.05.13-4.1) urgency=high java (1.8.0.05.13-4.1) urgency=high
   -- Kevin Weis <kevin.weis@faw.de> 2014-04-17   -- Kevin Weis <kevin.weis@faw.de> 2014-04-17
Line 197: Line 261:
   * change default of ProductProperty "VM-Type" from "jdk" to "jre" (if winst script is called by hand "jdk" is the default)   * change default of ProductProperty "VM-Type" from "jdk" to "jre" (if winst script is called by hand "jdk" is the default)
   * change default of ProductProperty "WebJava-Security_Level" from "M" to "VH"   * change default of ProductProperty "WebJava-Security_Level" from "M" to "VH"
-  * NOTE: I´m using the JCE patch for Java 8, this work for Java 7 too (tested, no unwanted behaviour with SHA384, SHA512 and AES192, AES256)+  * NOTE: I´m using the JCE patch for Java 8, this work for Java 7 too (tested, no unwanted behaviour with SHA384, SHA512, AES192 and AES256)
   Minor changes:   Minor changes:
     * Apply new variables nomination     * Apply new variables nomination
Line 204: Line 268:
     * clean up check_msi-exitcode; remove dead code and display fatal errors.     * clean up check_msi-exitcode; remove dead code and display fatal errors.
     * automate get last version of Java 7 and 8 (StringList)     * automate get last version of Java 7 and 8 (StringList)
- 
  
 java (1.8.0-4) urgency=high java (1.8.0-4) urgency=high
Line 216: Line 279:
  
 see also: http://www.oracle.com/technetwork/java/javase/8train-relnotes-latest-2153846.html see also: http://www.oracle.com/technetwork/java/javase/8train-relnotes-latest-2153846.html
- 
  
 java (7.0.51-3) urgency=high java (7.0.51-3) urgency=high
Line 224: Line 286:
   * find installed versions of JRE now by using a for loop (supporting deinstallation since java 6u10 x64 and x32)   * find installed versions of JRE now by using a for loop (supporting deinstallation since java 6u10 x64 and x32)
   * serval other little impovments   * serval other little impovments
- 
  
 java (7.0.40-2.2) urgency=high java (7.0.40-2.2) urgency=high
Line 232: Line 293:
         check_uninstall.ins:         check_uninstall.ins:
                 add explicit declaration for >=java-7.0.10 of "GetRegistryStringValue32" and "GetRegistryStringValue64"                 add explicit declaration for >=java-7.0.10 of "GetRegistryStringValue32" and "GetRegistryStringValue64"
- 
  
 java (7.0.25-2.1) urgency=high java (7.0.25-2.1) urgency=high
  -- Kevin Weis <kevin.weis@faw.de> 13:39 02.04.2013  -- Kevin Weis <kevin.weis@faw.de> 13:39 02.04.2013
         * check_uninstall.ins:4-9         * check_uninstall.ins:4-9
- 
  
 java (7.0.17-2.1) urgency=high java (7.0.17-2.1) urgency=high
  -- Kevin Weis <kevin.weis@faw.de> 13:39 02.04.2013  -- Kevin Weis <kevin.weis@faw.de> 13:39 02.04.2013
         - Bugfix bugfix = hing fest bei der Installation/Deinstallation         - Bugfix bugfix = hing fest bei der Installation/Deinstallation
- 
  
 java (7.0.9-2.0) urgency=high java (7.0.9-2.0) urgency=high
Line 250: Line 308:
         - autoupdate = off         - autoupdate = off
         - Bugfix = hing fest bei der Installation/Deinstallation         - Bugfix = hing fest bei der Installation/Deinstallation
- 
  
 java (7.0-7) testing; urgency=low java (7.0-7) testing; urgency=low
- 
  
 java (7.0-4) testing; urgency=low java (7.0-4) testing; urgency=low
  -- Kevin Weis <kevinweis@gmx.de> 12:39 05.11.2012  -- Kevin Weis <kevinweis@gmx.de> 12:39 05.11.2012
   * Initial package   * Initial package
- 
-</code> 
- 
-===== check_msi-exitcode.ins ===== 
-<code winst check_msi-exitcode.ins> 
-SetLogLevel = 2 
- 
-For $x$ In $StringList_Java6$ Do Sub_Uninstall_6 
-For $x$ In $StringList_Java7$ Do Sub_Uninstall_7 
-For $x$ In $StringList_Java8$ Do Sub_Uninstall_8 
- 
-SetLogLevel = $DefaultLogLevel$ 
- 
-; Reset changed variables 
-Sub "%ScriptPath%\Sub_UpdateVariables.ins" 
- 
-[Sub_Uninstall_6] 
-Message "Search Java 6.0.$x$ x32" 
-If $ProcessorArchitecture$ = "x86 System" 
- If ( "$x$" > "24" ) 
- Set $Temp_MsiSuffix$ = "FF" 
- Else 
- Set $Temp_MsiSuffix$ = "F0" 
- EndIf 
- 
- Set $ProductDisplayName$ = GetRegistryStringValue ( "[" + $RegistryPath$ + "{26A24AE4-039D-4CA4-87B4-2F832160" + "$x$" + $Temp_MsiSuffix$ + "}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{26A24AE4-039D-4CA4-87B4-2F832160" + "$x$" + $Temp_MsiSuffix$ + "}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
-EndIf 
- 
-If $ProcessorArchitecture$ = "64 Bit System" 
- If ( "$x$" > "23" ) 
- Set $Temp_MsiSuffix$ = "FF" 
- Else 
- Set $Temp_MsiSuffix$ = "F0" 
- EndIf 
- 
- Set $ProductDisplayName$ = GetRegistryStringValue32 ( "[" + $RegistryPath_x64$ + "{26A24AE4-039D-4CA4-87B4-2F832160" + "$x$" + $Temp_MsiSuffix$ + "}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{26A24AE4-039D-4CA4-87B4-2F832160" + "$x$" + $Temp_MsiSuffix$ + "}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
- 
- If ( "$x$" > "24" ) 
- Set $Temp_MsiSuffix$ = "FF" 
- Else 
- Set $Temp_MsiSuffix$ = "F0" 
- EndIf 
- 
- Message "Search Java 6.0.$x$ x64" 
- Set $ProductDisplayName$ = GetRegistryStringValue64 ( "[" + $RegistryPath$ + "{26A24AE4-039D-4CA4-87B4-2F864160" + "$x$" + $Temp_MsiSuffix$ + "}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{26A24AE4-039D-4CA4-87B4-2F864160" + "$x$" + $Temp_MsiSuffix$ + "}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
-EndIf 
- 
- 
- 
- 
-[Sub_Uninstall_7] 
- 
-If ( "$x$" > "23" ) 
- Set $Temp_MsiSuffix$ = "FF" 
-Else 
- Set $Temp_MsiSuffix$ = "F0" 
-EndIf 
- 
- 
-Message "Search Java JDK 7.0.$x$ x32" 
-If $ProcessorArchitecture$ = "x86 System" 
- Set $ProductDisplayName$ = GetRegistryStringValue ( "[" + $RegistryPath$ + "{32A3A4F4-B792-11D6-A78A-00B0D0170$x$0}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{32A3A4F4-B792-11D6-A78A-00B0D0170$x$0}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
-EndIf 
- 
-If $ProcessorArchitecture$ = "64 Bit System" 
- Set $ProductDisplayName$ = GetRegistryStringValue32 ( "[" + $RegistryPath_x64$ + "{32A3A4F4-B792-11D6-A78A-00B0D0170$x$0}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{32A3A4F4-B792-11D6-A78A-00B0D0170$x$0}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
- 
- Message "Search Java JDK 7.0.$x$ x64" 
- Set $ProductDisplayName$ = GetRegistryStringValue64 ( "[" + $RegistryPath$ + "{64A3A4F4-B792-11D6-A78A-00B0D0170$x$0}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{64A3A4F4-B792-11D6-A78A-00B0D0170$x$0}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
-EndIf 
- 
- 
-Message "Search Java JRE 7.0.$x$ x32" 
-If $ProcessorArchitecture$ = "x86 System" 
- Set $ProductDisplayName$ = GetRegistryStringValue ( "[" + $RegistryPath$ + "{26A24AE4-039D-4CA4-87B4-2F832170" + "$x$" + $Temp_MsiSuffix$ + "}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{26A24AE4-039D-4CA4-87B4-2F832170" + "$x$" + $Temp_MsiSuffix$ + "}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
-EndIf 
- 
-If $ProcessorArchitecture$ = "64 Bit System" 
- Set $ProductDisplayName$ = GetRegistryStringValue32 ( "[" + $RegistryPath_x64$ + "{26A24AE4-039D-4CA4-87B4-2F832170" + "$x$" + $Temp_MsiSuffix$ + "}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{26A24AE4-039D-4CA4-87B4-2F832170" + "$x$" + $Temp_MsiSuffix$ + "}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
- 
- Message "Search Java 7.0.$x$ x64" 
- Set $ProductDisplayName$ = GetRegistryStringValue64 ( "[" + $RegistryPath$ + "{26A24AE4-039D-4CA4-87B4-2F864170" + "$x$" + $Temp_MsiSuffix$ + "}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{26A24AE4-039D-4CA4-87B4-2F864170" + "$x$" + $Temp_MsiSuffix$ + "}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
-EndIf 
- 
- 
- 
- 
-[Sub_Uninstall_8] 
- 
-; TODO check on every update 
-If ( "$x$" >= "00" ) 
- Set $Temp_MsiSuffix$ = "FF" 
-Else 
- Set $Temp_MsiSuffix$ = "F0" 
-EndIf 
- 
-Message "Search Java JDK 8.0.$x$ x32" 
-If $ProcessorArchitecture$ = "x86 System" 
- Set $ProductDisplayName$ = GetRegistryStringValue ( "[" + $RegistryPath$ + "{32A3A4F4-B792-11D6-A78A-00B0D0180$x$0}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{32A3A4F4-B792-11D6-A78A-00B0D0180$x$0}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
-EndIf 
- 
-If $ProcessorArchitecture$ = "64 Bit System" 
- Set $ProductDisplayName$ = GetRegistryStringValue32 ( "[" + $RegistryPath_x64$ +  "{32A3A4F4-B792-11D6-A78A-00B0D0180$x$0}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{32A3A4F4-B792-11D6-A78A-00B0D0180$x$0}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
- 
- Message "Search Java JDK 8.0.$x$ x64" 
- Set $ProductDisplayName$ = GetRegistryStringValue64 ( "[" + $RegistryPath$ + "{64A3A4F4-B792-11D6-A78A-00B0D0180$x$0}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{64A3A4F4-B792-11D6-A78A-00B0D0180$x$0}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
-EndIf 
- 
- 
-Message "Search Java JRE 8.0.$x$ x32" 
-If $ProcessorArchitecture$ = "x86 System" 
- Set $ProductDisplayName$ = GetRegistryStringValue ( "[" + $RegistryPath$ + "{26A24AE4-039D-4CA4-87B4-2F832180" + "$x$" + $Temp_MsiSuffix$ + "}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{26A24AE4-039D-4CA4-87B4-2F832180" + "$x$" + $Temp_MsiSuffix$ + "}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
-EndIf 
- 
-If $ProcessorArchitecture$ = "64 Bit System" 
- Set $ProductDisplayName$ = GetRegistryStringValue32 ( "[" + $RegistryPath_x64$ + "{26A24AE4-039D-4CA4-87B4-2F832180" + "$x$" + $Temp_MsiSuffix$ + "}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{26A24AE4-039D-4CA4-87B4-2F832180" + "$x$" + $Temp_MsiSuffix$ + "}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
- 
- Message "Search Java JRE 8.0.$x$ x64" 
- Set $ProductDisplayName$ = GetRegistryStringValue64 ( "[" + $RegistryPath$ + "{26A24AE4-039D-4CA4-87B4-2F864180" + "$x$" + $Temp_MsiSuffix$ + "}] DisplayName" ) 
- If Not ( $ProductDisplayName$ = "" ) 
- Message "Uninstall " + $ProductDisplayName$ + "..." 
- Set $Temp_Msi$ = "{26A24AE4-039D-4CA4-87B4-2F864180" + "$x$" + $Temp_MsiSuffix$ + "}" 
- Sub "%ScriptPath%\delsub.ins" 
- EndIf 
-EndIf 
- 
-</code> 
- 
-===== delsub.ins ===== 
-<code winst delsub.ins> 
-Set $UninstallCommand$ = 'msiexec.exe /X ' + $Temp_Msi$ + ' /qb! REBOOT=ReallySuppress' 
- 
-KillTask "firefox.exe" 
-KillTask "iexplore.exe" 
-KillTask "chrome.exe" 
-KillTask "jqs.exe" 
-KillTask "java.exe" 
-KillTask "javaw.exe" 
- 
-SetLogLevel = 6 
-Message "Uninstall " + $ProductDisplayName$ 
-WinBatch_Uninstall /TimeOutSeconds 120 
-SetLogLevel = 1 
-Sub "%ScriptPath%\check_msi-exitcode.ins" 
-SetLogLevel = 1 
- 
-Message "Uninstall " + $ProductName$ + " done" 
- 
-[WinBatch_Uninstall] 
-$UninstallCommand$ 
- 
-</code> 
- 
-===== setup.ins ===== 
-<code winst setup.ins> 
-[Initial] 
-SetLogLevel = 5 
-ExitOnError = True 
-ScriptErrorMessages = Off 
-TraceMode = Off 
-StayOnTop = False 
- 
-[Actions] 
-RequiredWinstVersion >= "4.11.3" 
-Message "Prepare..." 
-DefStringList $StringList_Java6$ 
-DefStringList $StringList_Java7$ 
-DefStringList $StringList_Java8$ 
-DefVar $Argument_Msi_AutoUpdateCheck$ 
-DefVar $Argument_Msi_IExplorer$ 
-DefVar $Argument_Msi_Ju$ 
-DefVar $Argument_Msi_Mozilla$ 
-DefVar $Argument_Msi_SysTray$ 
-DefVar $Arguments_Exe$ 
-DefVar $Arguments_Msi$ 
-DefVar $DefaultLogLevel$ 
-DefVar $IsUninstall$ 
-DefVar $MicrosoftWindowsVersion$ 
-DefVar $MinimumSpace$ 
-DefVar $PathSetup_Data$ 
-DefVar $PathSetup_Exe32$ 
-DefVar $PathSetup_Exe64$ 
-DefVar $PathSetup_Msi32$ 
-DefVar $ProcessorArchitecture$ 
-DefVar $ProductDisplayName$ 
-DefVar $ProductDisplayVersion$ 
-DefVar $ProductDisplayVersion_x32$ 
-DefVar $ProductDisplayVersion_x64$ 
-DefVar $ProductName$ 
-DefVar $ProductProperty_Java-Updater$ 
-DefVar $ProductProperty_Version$ 
-DefVar $ProductProperty_VM-Type$ 
-DefVar $ProductProperty_WebJava$ 
-DefVar $ProductProperty_WebJava-Security_Level$ 
-DefVar $ProductVersion$ 
-DefVar $RegistryPath$ 
-DefVar $RegistryPath_x64$ 
-DefVar $Temp_ExitCode$ 
-DefVar $Temp_Message$ 
-DefVar $Temp_MicrosoftWindowsVersionRequired$ 
-DefVar $Temp_MicrosoftWindowsVersionRequiredName$ 
-DefVar $Temp_Msi$ 
-DefVar $Temp_MsiSuffix$ 
-DefVar $UninstallCommand$ 
-DefVar $UpdateVersion7$ 
-DefVar $UpdateVersion8$ 
- 
-Set $ProductName$ = "Java" 
- 
-; https://en.wikipedia.org/wiki/Java_version_history#Java_6_updates 
-Set $StringList_Java6$ = CreateStringList ( '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '43', '45', '51', '65', '71' ) 
- 
-; https://en.wikipedia.org/wiki/Java_version_history#Java_7_updates 
-Set $StringList_Java7$ = CreateStringList ( '00', '01', '02', '03', '04', '05', '06', '07', '09', '10', '11', '13', '15', '17', '21', '25', '40', '45', '51', '55' ) 
- 
-; https://en.wikipedia.org/wiki/Java_version_history#Java_8_updates 
-Set $StringList_Java8$ = CreateStringList ( '00', '05' ) 
- 
-; Get last update version 
-Set $UpdateVersion7$ = TakeString ( -1, $StringList_Java7$ ) 
-Set $UpdateVersion8$ = TakeString ( -1, $StringList_Java8$ ) 
- 
-Set $DefaultLogLevel$ = "5" 
-Set $IsUninstall$ = "False" 
-Set $MicrosoftWindowsVersion$ = GetMsVersionInfo 
-Set $MinimumSpace$ = "248 MB" 
-Set $PathSetup_Data$ = "%ScriptPath%\setup_data\" 
-Set $ProcessorArchitecture$ = GetSystemType 
-Set $ProductProperty_Java-Updater$ = GetProductProperty ( "Java-Updater" , "Off" ) 
-Set $ProductProperty_VM-Type$ = GetProductProperty ( "VM-Type" , "jdk" ) 
-Set $ProductProperty_Version$ = GetProductProperty ( "Version" , "8" ) 
-Set $ProductProperty_WebJava$ = GetProductProperty ( "WebJava" , "On" ) 
-Set $ProductProperty_WebJava-Security_Level$ = GetProductProperty ( "WebJava-Security_Level" , "VH" ) 
-Set $RegistryPath$ = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" 
-Set $RegistryPath_x64$ = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\" 
-Set $Temp_MsiSuffix$ = "" 
- 
-; Reset changed variables 
-Sub "%ScriptPath%\Sub_UpdateVariables.ins" 
- 
-; Parse selected ProductPropertys and generate installation argument list 
-If $ProductProperty_WebJava$ = "On" 
- Set $ProductProperty_WebJava$ = "WEB_JAVA=1" 
- Set $Argument_Msi_IExplorer$ = "IEXPLORER=1" 
- Set $Argument_Msi_Mozilla$ = "MOZILLA=1" 
-Else 
- Set $ProductProperty_WebJava$ = "WEB_JAVA=0" 
- Set $Argument_Msi_IExplorer$ = "IEXPLORER=0" 
- Set $Argument_Msi_Mozilla$ = "MOZILLA=0" 
-EndIf 
- 
-If $ProductProperty_WebJava-Security_Level$ = "M" 
- Set $ProductProperty_WebJava-Security_Level$ = "WEB_JAVA_SECURITY_LEVEL=M" 
-EndIf 
-If $ProductProperty_WebJava-Security_Level$ = "H" 
- Set $ProductProperty_WebJava-Security_Level$ = "WEB_JAVA_SECURITY_LEVEL=H" 
-EndIf 
-If $ProductProperty_WebJava-Security_Level$ = "VH" 
- Set $ProductProperty_WebJava-Security_Level$ = "WEB_JAVA_SECURITY_LEVEL=VH" 
-EndIf 
- 
-If $ProductProperty_Java-Updater$ = "On" 
- Set $Argument_Msi_SysTray$ = "SYSTRAY=1" 
- Set $ProductProperty_Java-Updater$ = "JAVAUPDATE=1" 
- Set $Argument_Msi_Ju$ = "JU=1" 
- Set $Argument_Msi_AutoUpdateCheck$ = "AUTOUPDATECHECK=1" 
-Else 
- Set $Argument_Msi_SysTray$ = "SYSTRAY=0" 
- Set $ProductProperty_Java-Updater$ = "JAVAUPDATE=0" 
- Set $Argument_Msi_Ju$ = "JU=0" 
- Set $Argument_Msi_AutoUpdateCheck$ = "AUTOUPDATECHECK=0" 
-EndIf 
- 
-Set $Arguments_Exe$ = "/s " + $ProductProperty_WebJava$ + " " + $ProductProperty_WebJava-Security_Level$ + " STATIC=0" 
-Set $Arguments_Msi$ = "/qb! REBOOT=ReallySuppess " + $Argument_Msi_IExplorer$ + " " + $Argument_Msi_Mozilla$ + " " + $Argument_Msi_SysTray$ + " " + $ProductProperty_Java-Updater$ + " " + $Argument_Msi_Ju$ + " " + $Argument_Msi_AutoUpdateCheck$ 
- 
-ShowBitMap /3 "%ScriptPath%\java.png" $ProductName$ 
-SetLogLevel = $DefaultLogLevel$ 
- 
-If $ProductProperty_Version$ = "7" 
- Set $Temp_MicrosoftWindowsVersionRequired$ = "5.1" 
- Set $Temp_MicrosoftWindowsVersionRequiredName$ = "XP" 
-Else 
- Set $Temp_MicrosoftWindowsVersionRequired$ = "6.0" 
- Set $Temp_MicrosoftWindowsVersionRequiredName$ = "Vista" 
-EndIf 
-If $MicrosoftWindowsVersion$ < $Temp_MicrosoftWindowsVersionRequired$ 
- Message "Fatal error: Minimum Windows " + $Temp_MicrosoftWindowsVersionRequiredName$ + " is required for " + $ProductName$ + " " + $ProductProperty_Version$ 
- LogError "Minimum Windows " + $Temp_MicrosoftWindowsVersionRequiredName$ + " is required for " + $ProductName$ + " " + $ProductProperty_Version$ 
- IsFatalError "Minimum Windows " + $Temp_MicrosoftWindowsVersionRequiredName$ + " is required For " + $ProductName$ + " " + $ProductProperty_Version$ 
-EndIf 
- 
-If Not ( HasMinimumSpace ( "%SystemDrive%", $MinimumSpace$ ) ) 
- Message "Fatal error: Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductName$ 
- LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductName$ 
- IsFatalError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed For " + $ProductName$ 
-EndIf 
- 
-Sub "%ScriptPath%\check_uninstall.ins" 
- 
-KillTask "firefox.exe" 
-KillTask "iexplore.exe" 
-KillTask "chrome.exe" 
-KillTask "jqs.exe" 
-KillTask "java.exe" 
-KillTask "javaw.exe" 
- 
-; ############################################################################################################################################# 
-; ################################################################### Install x64 ################################################################### 
-; ############################################################################################################################################# 
- 
-If $ProcessorArchitecture$ = "64 Bit System" 
-        Message "Install " + $ProductDisplayVersion_x64$ 
- If FileExists ( $PathSetup_Data$ + $PathSetup_Exe64$ ) 
- SetLogLevel = 6 
- WinBatch_install_x64 /WaitOnClose 
- SetLogLevel = 1 
- Sub "%ScriptPath%\check_msi-exitcode.ins" 
- Else 
- Message "Fatal error: File not found: " + $PathSetup_Data$ + $PathSetup_Exe64$ 
- LogError "File not found: " + $PathSetup_Data$ + $PathSetup_Exe64$ 
- IsFatalError "File not found: " + $exePath$ + $exe_64$ 
- EndIf 
-         
- If $ProductProperty_Java-Updater$ = "JAVAUPDATE=0" 
- Registry_disable_update /64Bit 
- EndIf 
-  
- Message "Install " + $ProductDisplayVersion_x32$ + " first try" 
- If FileExists ( $PathSetup_Data$ + $PathSetup_Exe32$ ) 
- SetLogLevel = 6 
- WinBatch_install_x86 /WaitOnClose 
- SetLogLevel = 1 
- Sub "%ScriptPath%\check_msi-exitcode.ins" 
- Else 
- LogWarning "File not found: " + $exePath$ + $exe_32$ 
- EndIf 
-  
- ; Installation of Java x86 at a x64 system envirement does "fail", because the java x86 installer seems NOT to be designed to be executed In a SYSTEM "user" conetxt. 
- Set $Temp_ExitCode$ = GetLastExitCode 
- If $Temp_ExitCode$ = "1619" 
- Comment "ExitCode = " + $Temp_ExitCode$ + ' ERROR_INSTALL_PACKAGE_OPEN_FAILED; This is what we expected, so its a "good" sign.' 
- SetLogLevel = 5 
- Files_delete_broken_x86_x64 /32Bit 
- SetLogLevel = 1 
- Sub "%ScriptPath%\check_msi-exitcode.ins" 
-  
- Message "Install " + $ProductDisplayVersion_x32$ + " second try" 
- If $ProductProperty_VM-Type$ = "jdk" 
- If FileExists ( $PathSetup_Data$ + $PathSetup_Msi32$ ) 
- SetLogLevel = 6 
- WinBatch_install_x86_64_UseMSI /WaitOnClose 
- SetLogLevel = 1 
- Sub "%ScriptPath%\check_msi-exitcode.ins" 
- Else 
- Message "Fatal error: File not found: " + $PathSetup_Data$ + $PathSetup_Msi32$ 
- LogError "File not found: " + $PathSetup_Data$ + $PathSetup_Msi32$ 
- IsFatalError "File not found: " + $exePath$ + $msi32$ 
- EndIf 
- EndIf 
-  
- ; Explicit install Java x86, because in this situation the Java Installer (MSI) only install the jdk And for some reason it does NOT install the jre :( 
- Set $PathSetup_Msi32$ = "msi\jre" + $ProductVersion$ + "\jre" + $ProductVersion$ + ".msi" 
- If FileExists ( $PathSetup_Data$ + $PathSetup_Msi32$ ) 
- SetLogLevel = 6 
- WinBatch_install_x86_64_UseMSI /WaitOnClose 
- SetLogLevel = 1 
- Sub "%ScriptPath%\check_msi-exitcode.ins" 
- Else 
- Message "Fatal error: File not found: " + $PathSetup_Data$ + $PathSetup_Msi32$ 
- LogError "File not found: " + $PathSetup_Data$ + $PathSetup_Msi32$ 
- IsFatalError "File not found: " + $PathSetup_Data$ + $PathSetup_Msi32$ 
- EndIf 
-  
- ; Reset changed variables 
- Sub "%ScriptPath%\Sub_UpdateVariables.ins" 
- Else 
- Sub "%ScriptPath%\check_msi-exitcode.ins" 
- EndIf 
- If $ProductProperty_Java-Updater$ = "JAVAUPDATE=0" 
- Registry_disable_update /32Bit 
- EndIf 
-EndIf 
- 
-; ############################################################################################################################################# 
-; ################################################################### Install x32 ################################################################### 
-; ############################################################################################################################################# 
- 
-If $ProcessorArchitecture$ = "x86 System" 
-        Message "Install " + $ProductDisplayVersion_x32$ 
- If FileExists ( $PathSetup_Data$ + $PathSetup_Exe32$ ) 
- SetLogLevel = 6 
- WinBatch_install_x86 /WaitOnClose 
- SetLogLevel = 1 
- Sub "%ScriptPath%\check_msi-exitcode.ins" 
- Else 
- Message "Fatal error: File not found: " + $PathSetup_Data$ + $PathSetup_Exe32$ 
- LogError "File not found: " + $PathSetup_Data$ + $PathSetup_Exe32$ 
- IsFatalError "File not found: " + $PathSetup_Data$ + $PathSetup_Exe32$ 
- EndIf 
- If $ProductProperty_Java-Updater$ = "JAVAUPDATE=0" 
- Registry_disable_update /32Bit 
- EndIf 
-EndIf 
- 
-; Patch JCE 
-If $ProcessorArchitecture$ = "64 Bit System" 
- If FileExists ( "%ProgramFiles64Dir%\Java\jre" + $ProductProperty_Version$ + "\bin\java.exe" ) 
- Message "Apply patch For JCE (Java Cryptography Extension)" 
- If $ProductProperty_VM-Type$ = "jdk" And FileExists ( "%ProgramFiles64Dir%\Java\jdk" + $ProductVersion$ + "\bin\javac.exe" ) 
- Files_patch_JCE_JDK_x64 
- EndIf 
- If $ProductProperty_VM-Type$ = "jdk" And ( Not ( FileExists ( "%ProgramFiles64Dir%\Java\jdk" + $ProductVersion$ + "\bin\javac.exe" ) ) ) 
- LogWarning "NOT Patching JCE for x64 JDK; File not found: %ProgramFiles64Dir%\Java\jdk" + $ProductVersion$ + "\bin\javac.exe" 
- EndIf 
- Files_patch_JCE_JRE_x64 
- Else 
- LogWarning "NOT Patching JCE for x64 JRE and JDK; File not found: %ProgramFiles64Dir%\Java\jre" + $ProductProperty_Version$ + "\bin\java.exe" 
- EndIf 
-EndIf 
- 
-If FileExists ( "%ProgramFiles32Dir%\Java\jre" + $ProductProperty_Version$ + "\bin\java.exe" ) 
- Message "Apply patch For JCE (Java Cryptography Extension)" 
- If $ProductProperty_VM-Type$ = "jdk" And FileExists ( "%ProgramFiles32Dir%\Java\jdk" + $ProductVersion$ + "\bin\javac.exe" ) 
- Files_patch_JCE_JDK_x86 
- EndIf 
- If $ProductProperty_VM-Type$ = "jdk" And ( Not ( FileExists ( "%ProgramFiles32Dir%\Java\jdk" + $ProductVersion$ + "\bin\javac.exe" ) ) ) 
- LogWarning "NOT Patching JCE for x86 JDK; File not found: %ProgramFiles32Dir%\Java\jdk" + $ProductVersion$ + "\bin\javac.exe" 
- EndIf 
- Files_patch_JCE_JRE_x86 
-Else 
- LogWarning "NOT Patching JCE for x86 JRE and JDK; File not found: %ProgramFiles32Dir%\Java\jre" + $ProductProperty_Version$ + "\bin\java.exe" 
-EndIf 
- 
-Message "Install complete" 
- 
- 
-[WinBatch_install_x86_64_UseMSI] 
-msiexec /i "$PathSetup_Data$$PathSetup_Msi32$" $Arguments_Msi$ 
- 
-[WinBatch_install_x86] 
-"$PathSetup_Data$$PathSetup_Exe32$" $Arguments_Exe$ 
- 
-[WinBatch_install_x64] 
-"$PathSetup_Data$$PathSetup_Exe64$" $Arguments_Exe$ 
- 
-[Files_delete_broken_x86_x64] 
-Delete -f -s "%ProgramFiles32Dir%\Java" 
- 
-[Registry_disable_update] 
-OpenKey [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy] 
-Set "EnableJavaUpdate"=REG_DWORD:0 
- 
-[Files_patch_JCE_JDK_x86] 
-Copy -s "%ScriptPath%\UnlimitedJCEPolicy\*.*" "%ProgramFiles32Dir%\Java\jdk$ProductVersion$\jre\lib\security" 
- 
-[Files_patch_JCE_JDK_x64] 
-Copy -s "%ScriptPath%\UnlimitedJCEPolicy\*.*" "%ProgramFiles64Dir%\Java\jdk$ProductVersion$\jre\lib\security" 
- 
-[Files_patch_JCE_JRE_x86] 
-Copy -s "%ScriptPath%\UnlimitedJCEPolicy\*.*" "%ProgramFiles32Dir%\Java\jre$ProductProperty_Version$\lib\security" 
- 
-[Files_patch_JCE_JRE_x64] 
-Copy -s "%ScriptPath%\UnlimitedJCEPolicy\*.*" "%ProgramFiles64Dir%\Java\jre$ProductProperty_Version$\lib\security" 
- 
-</code> 
- 
-===== Sub_UpdateVariables.ins ===== 
-<code winst Sub_UpdateVariables.ins> 
-If $ProductProperty_Version$ = "8" 
- Set $ProductDisplayVersion$ = $ProductProperty_Version$ + "u" + $UpdateVersion8$ 
- Set $ProductVersion$ = "1." + $ProductProperty_Version$ + ".0_" + $UpdateVersion8$ 
-EndIf 
-If $ProductProperty_Version$ = "7" 
- Set $ProductDisplayVersion$ = $ProductProperty_Version$ + "u" + $UpdateVersion7$ 
- Set $ProductVersion$ = "1." + $ProductProperty_Version$ + ".0_" + $UpdateVersion7$ 
-EndIf 
- 
-Set $PathSetup_Msi32$ = "msi\" + $ProductProperty_VM-Type$ + $ProductVersion$ + "\" + $ProductProperty_VM-Type$ + $ProductVersion$ + ".msi" 
-Set $PathSetup_Exe32$ = $ProductProperty_VM-Type$ + "-" + $ProductDisplayVersion$ + "-windows-i586.exe" 
-Set $PathSetup_Exe64$ = $ProductProperty_VM-Type$ + "-" + $ProductDisplayVersion$ + "-windows-x64.exe" 
-Set $ProductDisplayName$ = $ProductName$ + " " + $ProductDisplayVersion$ 
-Set $ProductDisplayVersion_x32$ = $ProductDisplayName$ + " " + $ProductProperty_VM-Type$ + " x32" 
-Set $ProductDisplayVersion_x64$ = $ProductDisplayName$ + " " + $ProductProperty_VM-Type$ + " x64" 
- 
-</code> 
- 
-===== uninstall.ins ===== 
-<code winst uninstall.ins> 
-[Initial] 
-SetLogLevel = 5 
-ExitOnError = True 
-ScriptErrorMessages = Off 
-TraceMode = Off 
-StayOnTop = False 
- 
-[Actions] 
-RequiredWinstVersion >= "4.11.3" 
-Message "Prepare..." 
-DefStringList $StringList_Java6$ 
-DefStringList $StringList_Java7$ 
-DefStringList $StringList_Java8$ 
-DefVar $Argument_Msi_AutoUpdateCheck$ 
-DefVar $Argument_Msi_IExplorer$ 
-DefVar $Argument_Msi_Ju$ 
-DefVar $Argument_Msi_Mozilla$ 
-DefVar $Argument_Msi_SysTray$ 
-DefVar $Arguments_Exe$ 
-DefVar $Arguments_Msi$ 
-DefVar $DefaultLogLevel$ 
-DefVar $IsUninstall$ 
-DefVar $MicrosoftWindowsVersion$ 
-DefVar $MinimumSpace$ 
-DefVar $PathSetup_Data$ 
-DefVar $PathSetup_Exe32$ 
-DefVar $PathSetup_Exe64$ 
-DefVar $PathSetup_Msi32$ 
-DefVar $ProcessorArchitecture$ 
-DefVar $ProductDisplayName$ 
-DefVar $ProductDisplayVersion$ 
-DefVar $ProductDisplayVersion_x32$ 
-DefVar $ProductDisplayVersion_x64$ 
-DefVar $ProductName$ 
-DefVar $ProductProperty_Java-Updater$ 
-DefVar $ProductProperty_Version$ 
-DefVar $ProductProperty_VM-Type$ 
-DefVar $ProductProperty_WebJava$ 
-DefVar $ProductProperty_WebJava-Security_Level$ 
-DefVar $ProductVersion$ 
-DefVar $RegistryPath$ 
-DefVar $RegistryPath_x64$ 
-DefVar $Temp_ExitCode$ 
-DefVar $Temp_Message$ 
-DefVar $Temp_MicrosoftWindowsVersionRequired$ 
-DefVar $Temp_Msi$ 
-DefVar $Temp_MsiSuffix$ 
-DefVar $UninstallCommand$ 
-DefVar $UpdateVersion7$ 
-DefVar $UpdateVersion8$ 
- 
-Set $ProductName$ = "Java" 
- 
-; https://en.wikipedia.org/wiki/Java_version_history#Java_6_updates 
-Set $StringList_Java6$ = CreateStringList ( '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '43', '45', '51', '65', '71' ) 
- 
-; https://en.wikipedia.org/wiki/Java_version_history#Java_7_updates 
-Set $StringList_Java7$ = CreateStringList ( '00', '01', '02', '03', '04', '05', '06', '07', '09', '10', '11', '13', '15', '17', '21', '25', '40', '45', '51', '55' ) 
- 
-; https://en.wikipedia.org/wiki/Java_version_history#Java_8_updates 
-Set $StringList_Java8$ = CreateStringList ( '00', '05' ) 
- 
-; Get last update version 
-Set $UpdateVersion7$ = TakeString ( -1, $StringList_Java7$ ) 
-Set $UpdateVersion8$ = TakeString ( -1, $StringList_Java8$ ) 
- 
-Set $DefaultLogLevel$ = "5" 
-Set $IsUninstall$ = "True" 
-Set $MicrosoftWindowsVersion$ = GetMsVersionInfo 
-Set $MinimumSpace$ = "248 MB" 
-Set $PathSetup_Data$ = "%ScriptPath%\setup_data\" 
-Set $ProcessorArchitecture$ = GetSystemType 
-Set $ProductProperty_Java-Updater$ = GetProductProperty ( "Java-Updater" , "Off" ) 
-Set $ProductProperty_VM-Type$ = GetProductProperty ( "VM-Type" , "jdk" ) 
-Set $ProductProperty_Version$ = GetProductProperty ( "Version" , "8" ) 
-Set $ProductProperty_WebJava$ = GetProductProperty ( "WebJava" , "On" ) 
-Set $ProductProperty_WebJava-Security_Level$ = GetProductProperty ( "WebJava-Security_Level" , "VH" ) 
-Set $RegistryPath$ = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" 
-Set $RegistryPath_x64$ = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\" 
-Set $Temp_MsiSuffix$ = "" 
- 
-; Reset changed variables 
-Sub "%ScriptPath%\Sub_UpdateVariables.ins" 
- 
-; Parse selected ProductPropertys and generate installation argument list 
-If $ProductProperty_WebJava$ = "On" 
- Set $ProductProperty_WebJava$ = "WEB_JAVA=1" 
- Set $Argument_Msi_IExplorer$ = "IEXPLORER=1" 
- Set $Argument_Msi_Mozilla$ = "MOZILLA=1" 
-Else 
- Set $ProductProperty_WebJava$ = "WEB_JAVA=0" 
- Set $Argument_Msi_IExplorer$ = "IEXPLORER=0" 
- Set $Argument_Msi_Mozilla$ = "MOZILLA=0" 
-EndIf 
- 
-If $ProductProperty_WebJava-Security_Level$ = "M" 
- Set $ProductProperty_WebJava-Security_Level$ = "WEB_JAVA_SECURITY_LEVEL=M" 
-EndIf 
-If $ProductProperty_WebJava-Security_Level$ = "H" 
- Set $ProductProperty_WebJava-Security_Level$ = "WEB_JAVA_SECURITY_LEVEL=H" 
-EndIf 
-If $ProductProperty_WebJava-Security_Level$ = "VH" 
- Set $ProductProperty_WebJava-Security_Level$ = "WEB_JAVA_SECURITY_LEVEL=VH" 
-EndIf 
- 
-If $ProductProperty_Java-Updater$ = "On" 
- Set $Argument_Msi_SysTray$ = "SYSTRAY=1" 
- Set $ProductProperty_Java-Updater$ = "JAVAUPDATE=1" 
- Set $Argument_Msi_Ju$ = "JU=1" 
- Set $Argument_Msi_AutoUpdateCheck$ = "AUTOUPDATECHECK=1" 
-Else 
- Set $Argument_Msi_SysTray$ = "SYSTRAY=0" 
- Set $ProductProperty_Java-Updater$ = "JAVAUPDATE=0" 
- Set $Argument_Msi_Ju$ = "JU=0" 
- Set $Argument_Msi_AutoUpdateCheck$ = "AUTOUPDATECHECK=0" 
-EndIf 
- 
-Set $Arguments_Exe$ = "/s " + $ProductProperty_WebJava$ + " " + $ProductProperty_WebJava-Security_Level$ 
-Set $Arguments_Msi$ = "/qb! REBOOT=ReallySuppess " + $Argument_Msi_IExplorer$ + " " + $Argument_Msi_Mozilla$ + " " + $Argument_Msi_SysTray$ + " " + $ProductProperty_Java-Updater$ + " " + $Argument_Msi_Ju$ + " " + $Argument_Msi_AutoUpdateCheck$ 
- 
-ShowBitMap /3 "%ScriptPath%\java.png" $ProductName$ 
-SetLogLevel = $DefaultLogLevel$ 
- 
-Sub "%ScriptPath%\check_uninstall.ins" 
- 
-Message "Uninstall complete" 
  
 </code> </code>
  
userspace/java-ng.1397731583.txt.gz · Last modified: 2021/08/23 08:37 (external edit)