anchor.diff:  :: Exit code to use when FORCE_CLOSE_PROCESSES is "no" and a running Java process is detected
   set FORCE_CLOSE_PROCESSES_EXIT_CODE=1618
   
  -:: Java re-install. Do you want to reinstall Java afterwards?
  -:: Change either of these to 'yes' if you want to reinstall Java after cleanup.
  -:: If you do, make sure to set the location, file names and arguments below!
  -set REINSTALL_JAVA_x64=no
  -set REINSTALL_JAVA_x86=no
  -
  -:: The JRE installer must be in a place the script can find it (e.g. network path, same directory, etc)
  -:: JRE 64-bit reinstaller
  -set JAVA_LOCATION_x64=%~dp0
  -set JAVA_BINARY_x64=jre-8u144-windows-x64.exe
  -set JAVA_ARGUMENTS_x64=/s
  -
  -:: JRE 32-bit reinstaller
  -set JAVA_LOCATION_x86=%~dp0
  -set JAVA_BINARY_x86=jre-8u144-windows-x86.exe
  -set JAVA_ARGUMENTS_x86=/s
   
   
   
  
positive.code: :: Author:        reddit.com/user/vocatus ( vocatus.gate at gmail ) // PGP key: 0x07d1490f82a211a2
  ::                Latest version is always here: http://www.reddit.com/r/usefulscripts/comments/2hzt5c/batch_java_runtime_nuker_purge_all_versions_of/
  ::                additional thanks to: 
  ::                 - /u/sdjason         : JRE reinstall functionality; selective process killing; et al
  ::                 - /u/MrYiff          : bug fix related to OS_VERSION variable
  ::                 - /u/cannibalkitteh  : additional registry & file cleaning locations
  ::                 - forums.oracle.com/people/mattmn : a lot of stuff from his Java removal script
  :: Version:       1.8.4 + ADDITIONS:   Add support for removal of JRE series 9
  ::                1.8.3 * IMPROVEMENT: Add deletion of orphaned Java binaries from the Windows system folders. Thanks to /u/Mikkehy
  ::                1.8.2 * IMPROVEMENT: Expand JRE8 mask to catch versions over 99 (3-digit identifier vs. 2). Thanks to /u/flash44007
  ::                1.8.1 ! BUG FIX:     Fix crash error on unescaped "*" character
  ::                1.8.0 ! BUG FIX:     Fix uncommon failure where JRE uninstallers fail because they can't find certain files. Thanks to /u/GoogleDrummer
  ::                      * IMPROVEMENT: Import logging function used in Tron and convert all double "echo" statements to log calls
  ::                      * COMMENTS:    Minor comment cleanup
  ::                1.7.2 * IMPROVEMENT: Add section to remove leftover symlinks in PATH folder to JRE exes. Thanks to /u/turnerf
  ::                1.7.1 * IMPROVEMENT: Remove all /va flags. This had the effect of deleting key values but leaving keys intact, which could break re-installations that thought Java was still installed when in fact it was not. Big thanks to /u/RazorZero
  ::                      * IMPROVEMENT: Reduce 10 JavaSoft registry key deletion commands to 2 by deleting entire JavaSoft key instead of individual subkeys. Thanks to /u/RazorZero
  ::                1.7.0 * IMPROVEMENT: Target additional JRE8 GUID {26A24AE4-039D-4CA4-87B4-2F8__180__F0}. Thanks to /u/Caboose816
  ::                1.6.9 * IMPROVEMENT: Add process "jp2launcher" to target for killing (or checking) before running. Thanks to /u/citricacidx
  ::                1.6.8 ! BUG FIX:     Expand WMI uninstaller mask to catch MSI code for JRE7u67. Thanks to /u/placebonocebo
  ::                1.6.7 * IMPROVEMENT: Delete %ProgramData%\Microsoft\Windows\Start Menu\Programs\Java\ if it exists. Thanks to /u/placebonocebo
  ::                <outdated changelog comments removed>
  ::                1.0.0   Initial write
  SETLOCAL
  
negative.code: :: PRE-DELETE ::
  ::::::::::::::::
  :: Sometimes the JRE uninstallers will fail if they can't find some files; deleting the reg keys seems to resolve it
  :: Thanks to u/GoogleDrummer for this section
  regedit /e "%TEMP%\dump.txt" HKEY_CLASSES_ROOT\Installer\Products
  find "HKEY_CLASSES_ROOT\Installer\Products\4EA42A62" "%TEMP%\dump.txt" > "%TEMP%\keys_to_delete.txt"
  for /f "delims=[]" %%i in (%TEMP%\keys_to_delete.txt) do reg delete "%%i" /f >> "%LOGPATH%\%LOGFILE%" 2>NUL
  