anchor.diff:  :: we skip JRE 8 because the JRE 8 updater automatically removes older versions, no need to do it twice
   
   :: JRE 7
  -echo %CUR_DATE% %TIME%    JRE 7...>> "%LOGPATH%\%LOGFILE%"
  -echo %CUR_DATE% %TIME%    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
  -echo %CUR_DATE% %TIME%    JRE 6...>> "%LOGPATH%\%LOGFILE%"
  -echo %CUR_DATE% %TIME%    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
  -echo %CUR_DATE% %TIME%    JRE 5...>> "%LOGPATH%\%LOGFILE%"
  -echo %CUR_DATE% %TIME%    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
  -echo %CUR_DATE% %TIME%    JRE 4...>> "%LOGPATH%\%LOGFILE%"
  -echo %CUR_DATE% %TIME%    JRE 4...
  +call :log JRE 4...
   %WMIC% product where "IdentifyingNumber like '{7148F0A8-6813-11D6-A77B-00B0D0142__0}'" call uninstall /nointeractive>> "%LOGPATH%\%LOGFILE%" 2>NUL
   
  -echo %CUR_DATE% %TIME%    Done.>> "%LOGPATH%\%LOGFILE%"
  -echo %CUR_DATE% %TIME%    Done.
  +call :log Done.
  +
   
   :: JOB: Java Runtime 8
  -echo %CUR_DATE% %TIME%    Launch job 'Update Java Runtime Environment'...>> "%LOGPATH%\%LOGFILE%"
  -echo %CUR_DATE% %TIME%    Launch job 'Update Java Runtime Environment'...
  +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' (
  -	echo %CUR_DATE% %TIME%    x86 architecture detected, installing x86 version...>> "%LOGPATH%\%LOGFILE%"
  -	echo %CUR_DATE% %TIME%    x86 architecture detected, installing x86 version...
  +	call :log x86 architecture detected, installing x86 version...
   	setlocal
   	call "stage_4_patch\java\jre\8\x86\jre-8-i586.bat"
   	endlocal
   ) else (
  -	echo %CUR_DATE% %TIME%    x64 architecture detected, installing x64 version...>> "%LOGPATH%\%LOGFILE%"
  -	echo %CUR_DATE% %TIME%    x64 architecture detected, installing x64 version...
  +	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
  -echo %CUR_DATE% %TIME%    Done.>> "%LOGPATH%\%LOGFILE%"
  -echo %CUR_DATE% %TIME%    Done.
  +
  +call :log Done.
   
   
   :: JOB: Skip point for if -sp (skip patches) flag was used
  
positive.code: echo stage_2_de-bloat>tron_stage.txt
  title TRON v%SCRIPT_VERSION% [stage_2_de-bloat]
  if /i %SKIP_DEBLOAT%==yes (
  	echo %CUR_DATE% %TIME% ! SKIP_DEBLOAT ^(-sb^) set, skipping Stage 2 jobs...>> "%LOGPATH%\%LOGFILE%"
  	echo %CUR_DATE% %TIME% ! SKIP_DEBLOAT ^(-sb^) set, skipping Stage 2 jobs...
  	goto skip_debloat
  	)
  
  echo %CUR_DATE% %TIME%   stage_2_de-bloat begin...>> "%LOGPATH%\%LOGFILE%"
  echo %CUR_DATE% %TIME%   stage_2_de-bloat begin...
  
  
  :: JOB: Remove crapware programs, phase 1 (by name)
  echo %CUR_DATE% %TIME%    Attempt junkware removal: Phase 1 (by name)...>> "%LOGPATH%\%LOGFILE%"
  echo %CUR_DATE% %TIME%    Attempt junkware removal: Phase 1 (by name)...
  echo %CUR_DATE% %TIME%    Customize here: \resources\stage_2_de-bloat\oem\programs_to_target.txt>> "%LOGPATH%\%LOGFILE%"
  echo %CUR_DATE% %TIME%    Customize here: \resources\stage_2_de-bloat\oem\programs_to_target.txt
  :: Search through the list of programs in "programs_to_target.txt" file and uninstall them one-by-one
  if /i %DRY_RUN%==no FOR /F "tokens=*" %%i in (stage_2_de-bloat\oem\programs_to_target.txt) DO echo   %%i && echo   %%i...>> "%LOGPATH%\%LOGFILE%" && %WMIC% product where "name like '%%i'" uninstall /nointeractive>> "%LOGPATH%\%LOGFILE%"
  echo %CUR_DATE% %TIME%    Done.>> "%LOGPATH%\%LOGFILE%"
  echo %CUR_DATE% %TIME%    Done.
  
  
  :: JOB: Remove crapware programs, phase 2 (by GUID)
  echo %CUR_DATE% %TIME%    Attempt junkware removal: Phase 2 (by GUID)...>> "%LOGPATH%\%LOGFILE%"
  echo %CUR_DATE% %TIME%    Attempt junkware removal: Phase 2 (by GUID)...
  echo %CUR_DATE% %TIME%    Customize here: \resources\stage_2_de-bloat\oem\programs_to_target_by_GUID.bat>> "%LOGPATH%\%LOGFILE%"
  echo %CUR_DATE% %TIME%    Customize here: \resources\stage_2_de-bloat\oem\programs_to_target_by_GUID.bat
  if /i %DRY_RUN%==no call stage_2_de-bloat\oem\programs_to_target_by_GUID.bat
  echo %CUR_DATE% %TIME%    Done.>> "%LOGPATH%\%LOGFILE%"
  echo %CUR_DATE% %TIME%    Done.
  
  
  :: JOB: Remove default Metro apps (Windows 8/8.1/2012/2012-R2 only). Thanks to https://keybase.io/exabrial
  
negative.code: set FREE_SPACE_SAVED=0
  set UNICORN_POWER_MODE=off
  set SAFE_MODE=no
  if /i "%SAFEBOOT_OPTION%"=="MINIMAL" set SAFE_MODE=yes
  if /i "%SAFEBOOT_OPTION%"=="NETWORK" set SAFE_MODE=yes
  set RESUME_STAGE=0
  set RESUME_FLAGS=0
  set RESUME_DETECTED=no
  