anchor.diff:  :::::::::::::::::::::
   :: PREP AND CHECKS ::
   :::::::::::::::::::::
  -set STAGE_2_SCRIPT_VERSION=1.1.7
  -set STAGE_2_SCRIPT_DATE=2016-10-27
  +set STAGE_2_SCRIPT_VERSION=1.2.0
  +set STAGE_2_SCRIPT_DATE=2016-11-01
   
   :: Quick check to see if we inherited the appropriate variables from Tron.bat
   if /i "%LOGFILE%"=="" (
  
positive.code: :: JOB: Remove crapware programs, phase 1: by specific GUID
  title Tron v%SCRIPT_VERSION% [stage_2_de-bloat] [Remove bloatware by GUID]
  call functions\log.bat "%CUR_DATE% %TIME%    Attempt junkware removal: Phase 1 (by specific GUID)..."
  call functions\log.bat "%CUR_DATE% %TIME%    Tweak 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 >> "%LOGPATH%\%LOGFILE%" 2>&1
  call functions\log.bat "%CUR_DATE% %TIME%    Done."
  
  
  :: JOB: Remove crapware programs, phase 3: unwanted toolbars and BHOs by GUID
  title Tron v%SCRIPT_VERSION% [stage_2_de-bloat] [Remove toolbars by GUID]
  call functions\log.bat "%CUR_DATE% %TIME%    Attempt junkware removal: Phase 2 (toolbars by specific GUID)..."
  call functions\log.bat "%CUR_DATE% %TIME%    Tweak here: \resources\stage_2_de-bloat\oem\toolbars_BHOs_to_target_by_GUID.bat"
  if /i %DRY_RUN%==no call stage_2_de-bloat\oem\toolbars_BHOs_to_target_by_GUID.bat >> "%LOGPATH%\%LOGFILE%" 2>&1
  call functions\log.bat "%CUR_DATE% %TIME%    Done."
  
  
  
negative.code: title Tron v%SCRIPT_VERSION% [stage_2_de-bloat] [Remove bloatware by name]
  call functions\log.bat "%CUR_DATE% %TIME%    Attempt junkware removal: Phase 3 (wildcard by name)..."
  call functions\log.bat "%CUR_DATE% %TIME%    Tweak here: \resources\stage_2_de-bloat\oem\programs_to_target_by_name.txt"
  if /i %DRY_RUN%==no ( if /i %VERBOSE%==yes ( echo Looking for: ) )
  :: Search through the list of programs in "programs_to_target.txt" file and uninstall them one-by-one
  if /i %DRY_RUN%==no ( 
  
  	REM This is required so we can check errorlevel inside the FOR loop
  	SETLOCAL ENABLEDELAYEDEXPANSION
  
  	REM Verbose output check
  	if /i %VERBOSE%==yes echo Looking for:
  
  	REM Loop through the file...
  	for /f %%i in (stage_2_de-bloat\oem\programs_to_target_by_name.txt) do (
  		REM  ...and for each line: a. check if it is a comment or SET command and b. perform the removal if not
  		if not %%i==:: (
  		if not %%i==set (
  			if /i %VERBOSE%==yes echo    %%i
  			"%WMIC% product where "name like '%%i'" uninstall /nointeractive>> "%LOGPATH%\%LOGFILE%""
  			REM Check if the uninstaller added entries to PendingFileRenameOperations if it did, export the contents, nuke the key value, then continue on
  			reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v PendingFileRenameOperations >nul 2>&1
  			if !errorlevel!==0 (
  				echo Offending GUID: %%i >> "%RAW_LOGS%\PendingFileRenameOperations_export.txt"
  				reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v PendingFileRenameOperations >> "%RAW_LOGS%\PendingFileRenameOperations_export.txt"
  				reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v PendingFileRenameOperations /f >nul 2>&1
  				if /i %VERBOSE%==yes echo  ^^! Detected filenames in PendingFileRenameOperations. Entries exported to "%RAW_LOGS%\PendingFileRenameOperations_export.txt" and deleted.
  				echo  ^^! Detected filenames in PendingFileRenameOperations. Entries exported to "%RAW_LOGS%\PendingFileRenameOperations_export.txt" and deleted. >> "%LOGPATH%\%LOGFILE%"
  				echo ------------------------------------------------------------------- >> "%RAW_LOGS%\PendingFileRenameOperations_export.txt"
  				)
  			)
  		)
  	)
  	ENDLOCAL DISABLEDELAYEDEXPANSION
  )
  call functions\log.bat "%CUR_DATE% %TIME%    Done."
  
  