anchor.diff:  reg query "hklm\software\microsoft\net framework setup\ndp\v3.5" /v Install 2>nul | %FIND% /i "0x1" >nul 2>&1
   if %ERRORLEVEL%==0 (
   	title Tron v%TRON_VERSION% [stage_0_prep] [McAfee Stinger]
  -	call functions\log_with_date.bat "    Launch job 'McAfee Stinger'..."
  -	call functions\log_with_date.bat "    Stinger doesn't support text logs, saving HTML log to "%RAW_LOGS%\""
  +	call functions\log_with_date.bat "   Launch job 'McAfee Stinger'..."
  +	call functions\log_with_date.bat "   Stinger doesn't support text logs, saving HTML log to "%RAW_LOGS%\""
   	if /i %DRY_RUN%==no start /wait stage_0_prep\mcafee_stinger\stinger32.exe --GO --SILENT --PROGRAM --REPORTPATH="%RAW_LOGS%" --DELETE
  -	call functions\log_with_date.bat "    Done."
  +	call functions\log_with_date.bat "   Done."
   ) else (
  -	call functions\log_with_date.bat "    System is missing .NET 3.5, skipping McAfee Stinger scan."
  +	call functions\log_with_date.bat "   System is missing .NET 3.5, skipping McAfee Stinger scan."
   )
   
   
   :: JOB: TDSS Killer
   title Tron v%TRON_VERSION% [stage_0_prep] [TDSS Killer]
  -call functions\log_with_date.bat "    Launch job 'TDSS Killer'..."
  +call functions\log_with_date.bat "   Launch job 'TDSS Killer'..."
   if /i %DRY_RUN%==no (
   	"stage_0_prep\tdss_killer\TDSSKiller.exe" -l "%TEMP%\tdsskiller.log" -silent -tdlfs -dcexact -accepteula -accepteulaksn
   	:: Dump TDSSKiller log into the main Tron log
   	type "%TEMP%\tdsskiller.log" >> "%LOGPATH%\%LOGFILE%"
   	del "%TEMP%\tdsskiller.log" 2>NUL
   )
  -call functions\log_with_date.bat "    Done."
  -
  -
  -:: JOB: Purge oldest shadow copies
  -title Tron v%TRON_VERSION% [stage_0_prep] [Purge oldest shadow copies]
  -:: Only versions of Windows older than Vista had "Microsoft" as the first part of their title, so if
  -:: we don't find "Microsoft" in the first 9 characters we can safely assume we're not on XP/2k3
  -:: Then we check for Vista, because vssadmin on Vista doesn't support deleting old copies. Sigh.
  -if %WIN_VER_NUM% geq 6.1 (
  -	call functions\log_with_date.bat "    Launch job 'Purge oldest Shadow Copy set (Win7 and up)'..."
  -	if /i %DRY_RUN%==no (
  -		:: Force allow us to start VSS service in Safe Mode
  -		reg add "HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\%SAFEBOOT_OPTION%\VSS" /ve /t reg_sz /d Service /f >nul 2>&1
  -		net start VSS >nul 2>&1
  -		vssadmin delete shadows /for=%SystemDrive% /oldest /quiet >nul 2>&1
  -	)
  -	call functions\log_with_date.bat "    Done."
  -)
  -
  -
  -:: JOB: Reduce SysRestore space
  -title Tron v%TRON_VERSION% [stage_0_prep] [System Restore Modifications]
  -call functions\log_with_date.bat "    Reducing max allowed System Restore space to 7%%%% of disk..."
  -if /i %DRY_RUN%==no (
  -	%SystemRoot%\System32\reg.exe add "\\%COMPUTERNAME%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v DiskPercent /t REG_DWORD /d 00000007 /f>> "%LOGPATH%\%LOGFILE%"
  -	%SystemRoot%\System32\reg.exe add "\\%COMPUTERNAME%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\Cfg" /v DiskPercent /t REG_DWORD /d 00000007 /f>> "%LOGPATH%\%LOGFILE%"
  -)
  -call functions\log_with_date.bat "    Done."
  -
  +call functions\log_with_date.bat "   Done."
   
   
   
   :: Stage complete
  -call functions\log_with_date.bat "   stage_0_prep complete."
  +call functions\log_with_date.bat "  stage_0_prep complete."
  
positive.code: :::::::::::::::::::::
  :: PREP AND CHECKS ::
  :::::::::::::::::::::
  set STAGE_0_SCRIPT_VERSION=1.1.7
  set STAGE_0_SCRIPT_DATE=2017-03-02
  
  :: Check for standalone vs. Tron execution and build the environment if running in standalone mode
  if /i "%LOGFILE%"=="" (
  
negative.code:   
  	REM Create the restore point
  	echo "%WIN_VER%" | findstr /i /c:"server" >NUL || (
  		call functions\log_with_date.bat "   Creating pre-run Restore Point..."
  		if /i %DRY_RUN%==no powershell "Checkpoint-Computer -Description 'TRON v%TRON_VERSION%: Pre-run checkpoint' | Out-Null" >> "%LOGPATH%\%LOGFILE%" 2>&1
  	)
  call functions\log_with_date.bat "   OK."
  )
  :skip_restore_point_creation
  
  
  :: JOB: Capture screenshot of the desktop. First hide all windows, then capture the screenshot, then restore all windows
  title Tron v%TRON_VERSION% [stage_0_prep] [screenshot]
  call functions\log_with_date.bat "   Saving screenshot of the desktop to "%RAW_LOGS%"..."
  if /i %DRY_RUN%==no (
  	stage_0_prep\capture_screenshot\nircmdc.exe sendkeypress rwin+m
  	stage_0_prep\capture_screenshot\nircmdc.exe cmdwait 500 savescreenshotfull "%RAW_LOGS%\tron_%COMPUTERNAME%_pre-run_screenshot_%DTS:~0,12%.png"
  	stage_0_prep\capture_screenshot\nircmdc.exe sendkeypress rwin+shift+m
  )
  call functions\log_with_date.bat "   Done."
  
  
  :: JOB: rkill
  title Tron v%TRON_VERSION% [stage_0_prep] [rkill]
  call functions\log_with_date.bat "   Launch job 'rkill'..."
  call functions\log_with_date.bat "   If script stalls 20 min or more, kill explorer64.exe and explorer.exe with Task Manager"
  if /i %DRY_RUN%==no (
  	stage_0_prep\rkill\explorer.exe -s -l "%TEMP%\tron_rkill.log" -w "stage_0_prep\rkill\rkill_process_whitelist.txt"
  	type "%TEMP%\tron_rkill.log" >> "%LOGPATH%\%LOGFILE%" 2>NUL
  	del "%TEMP%\tron_rkill.log" 2>NUL
  	if exist "%HOMEDRIVE%\%HOMEPATH%\Desktop\Rkill.txt" del "%HOMEDRIVE%\%HOMEPATH%\Desktop\Rkill.txt" 2>NUL
  )
  call functions\log_with_date.bat "   Done."
  
  
  :: JOB: Get pre-run system state (installed programs, complete file list)
  title Tron v%TRON_VERSION% [stage_0_prep] [Analyze System State]
  call functions\log_with_date.bat "   Generating pre-run system profile..."
  if /i %DRY_RUN%==no (
  	:: Get list of installed programs
  	if %PROCESSOR_ARCHITECTURE%==x86 start stage_0_prep\log_tools\siv\siv32x.exe -save=[software]="%RAW_LOGS%\installed-programs-before.txt"
  