anchor.diff:  :: INSTALLATION ::
   ::::::::::::::::::
   :: This first removes previous versions of the JRE
  +echo %CUR_DATE% %TIME% Removing previous versions, please wait...
  +echo %CUR_DATE% %TIME% Removing previous versions, please wait...>> "%LOGPATH%\%LOGFILE%" 2>NUL
   echo %CUR_DATE% %TIME%   Uninstalling all versions of JRE 8 x64 prior to installation of current version...>> "%LOGPATH%\%LOGFILE%"
   wmic product where "IdentifyingNumber like '{26A24AE4-039D-4CA4-87B4-2F864180__F_}'" call uninstall /nointeractive >> "%LOGPATH%\%LOGFILE%"
   :: Second version of the command to catch JRE8 versions above 99 where they start using 3-digit identifiers instead of 2-digit
   wmic product where "IdentifyingNumber like '{26A24AE4-039D-4CA4-87B4-2F64180___F_}'" call uninstall /nointeractive >> "%LOGPATH%\%LOGFILE%"
   
  -
   :: Sometimes the previous line doesn't work for whatever reason, so we run this line as well
   wmic product where "name like 'Java 8 Update %% (64-bit)'" uninstall /nointeractive
  +echo %CUR_DATE% %TIME% Done.
  +echo %CUR_DATE% %TIME% Done.>> "%LOGPATH%\%LOGFILE%" 2>NUL
  +
   
   :: Install the package from a local directory (if all files are in the same directory)
   :: Nothing below this line will log correctly, because MSI logs in a different format than the standard "echo >> %logfile%" commands. Haven't had time to find a workaround.
  +echo %CUR_DATE% %TIME% Installing package...
  +echo %CUR_DATE% %TIME% Installing package...>> "%LOGPATH%\%LOGFILE%" 2>NUL
   msiexec /i "%BINARY%" %FLAGS%
  +echo %CUR_DATE% %TIME% Done.
  +echo %CUR_DATE% %TIME% Done.>> "%LOGPATH%\%LOGFILE%" 2>NUL
  +
  +
  +echo %CUR_DATE% %TIME% Disabling telemetry and cleaning up...
  +echo %CUR_DATE% %TIME% Disabling telemetry and cleaning up...>> "%LOGPATH%\%LOGFILE%" 2>NUL
   
   :: This line kills the Java Update scheduler if it's running
   %SystemRoot%\System32\taskkill.exe /f /im jusched.exe>>%LOGPATH%\%LOGFILE% 2>NUL
  
positive.code: :: Variables :: -- Set these to your desired values
  :::::::::::::::
  :: Log location and name. Do not use trailing slashes (\)
  set LOGPATH=%SystemDrive%\Logs
  set LOGFILE=jre8_x64_update.log
  
  :: Package to install. Do not use trailing slashes (\)
  set LOCATION=
  set BINARY=jre-8u211-windows-x64.msi
  set FLAGS=ALLUSERS=1 /qn /norestart /l %LOGPATH%\%LOGFILE% JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA_SECURITY_LEVEL=M
  
  :: Create the log directory if it doesn't exist
  
negative.code: XCOPY deployment.* %WINDIR%\Sun\Java\Deployment /I /Y
  XCOPY *.sites %WINDIR%\Sun\Java\Deployment /I /Y
  
  echo %CUR_DATE% %TIME% Done.
  echo %CUR_DATE% %TIME% Done.>> "%LOGPATH%\%LOGFILE%" 2>NUL
  
  :: Pop back to original directory. This isn't necessary in stand-alone runs of the script, but is needed when being called from another script
  popd
  
  :: Return exit code to SCCM/PDQ Deploy/etc
  exit /B %EXIT_CODE%
  