anchor.diff:  		if /i %GENERATE_SUMMARY_LOGS%==yes stage_6_wrap-up\email_report\SwithMail.exe /s /x "stage_6_wrap-up\email_report\SwithMailSettings.xml" /a "%LOGPATH%\%LOGFILE%|%LOGPATH%\tron_summary_logs\tron_removed_files.txt|%LOGPATH%\tron_summary_logs\tron_removed_programs.txt" /p1 "Tron v%SCRIPT_VERSION% (%SCRIPT_DATE%) executed as %USERDOMAIN%\%USERNAME%" /p2 "%LOGPATH%\%LOGFILE%" /p3 "%SAFE_MODE% %SAFEBOOT_OPTION%" /p4 "%FREE_SPACE_BEFORE%/%FREE_SPACE_AFTER%/%FREE_SPACE_SAVED%" /p5 "%ARGUMENTS%"
   
   		if %ERRORLEVEL%==0 (
  -			echo %CUR_DATE% %TIME%   Done.>> "%LOGPATH%\%LOGFILE%"
  -			echo %CUR_DATE% %TIME%   Done.
  +			call :log_heading Done.
   		) else (
  -			echo %CUR_DATE% %TIME% ! Something went wrong, email may not have gone out. Check your settings.>> "%LOGPATH%\%LOGFILE%"
  -			echo %CUR_DATE% %TIME% ! Something went wrong, email may not have gone out. Check your settings.
  +			call :log_heading_alert Something went wrong, email may not have gone out. Check your settings.
   		)
   	)
   )
  
positive.code: 			)
  		)
  	)
  echo %CUR_DATE% %TIME%    Done.>> "%LOGPATH%\%LOGFILE%"
  echo %CUR_DATE% %TIME%    Done.
  
  
  echo %CUR_DATE% %TIME%   stage_4_patch jobs complete.>> "%LOGPATH%\%LOGFILE%"
  echo %CUR_DATE% %TIME%   stage_4_patch jobs complete.
  
  
  
  
negative.code: :: we skip JRE 8 because the JRE 8 updater automatically removes older versions, no need to do it twice
  
  :: JRE 7
  call :log JRE 7...
  %WMIC% product where "IdentifyingNumber like '{26A24AE4-039D-4CA4-87B4-2F___170__FF}'" call uninstall /nointeractive >> "%LOGPATH%\%LOGFILE%" 2>NUL
  
  :: JRE 6
  call :log JRE 6...
  :: 1st line is for updates 23-xx, after 64-bit runtimes were introduced.
  :: 2nd line is for updates 1-22, before Oracle released 64-bit JRE 6 runtimes
  %WMIC% product where "IdentifyingNumber like '{26A24AE4-039D-4CA4-87B4-2F8__160__FF}'" call uninstall /nointeractive>> "%LOGPATH%\%LOGFILE%" 2>NUL
  %WMIC% product where "IdentifyingNumber like '{3248F0A8-6813-11D6-A77B-00B0D0160__0}'" call uninstall /nointeractive>> "%LOGPATH%\%LOGFILE%" 2>NUL
  
  :: JRE 5
  call :log JRE 5...
  %WMIC% product where "IdentifyingNumber like '{3248F0A8-6813-11D6-A77B-00B0D0150__0}'" call uninstall /nointeractive>> "%LOGPATH%\%LOGFILE%" 2>NUL
  
  :: JRE 4
  call :log JRE 4...
  %WMIC% product where "IdentifyingNumber like '{7148F0A8-6813-11D6-A77B-00B0D0142__0}'" call uninstall /nointeractive>> "%LOGPATH%\%LOGFILE%" 2>NUL
  
  call :log Done.
  
  
  :: JOB: Java Runtime 8
  call :log Launch job 'Update Java Runtime Environment'...
  
  :: Check if we're on 32-bit Windows and run the appropriate installer
  if /i '%PROCESSOR_ARCHITECTURE%'=='x86' (
  	call :log x86 architecture detected, installing x86 version...
  	setlocal
  	call "stage_4_patch\java\jre\8\x86\jre-8-i586.bat"
  	endlocal
  ) else (
  	call :log x64 architecture detected, installing x64 version...
  	setlocal
  	call "stage_4_patch\java\jre\8\x64\jre-8-x64.bat"
  	endlocal
  	)
  
  :skip_jre_update
  
  call :log Done.
  
  
  :: JOB: Skip point for if -sp (skip patches) flag was used
  