anchor.diff:  :: AUTO_SHUTDOWN         (-o)   = Shutdown after the finishing. Overrides auto-reboot
   :: PRESERVE_POWER_SCHEME (-p)   = Preserve active power scheme. Default is to reset power scheme to Windows defaults at the end of Tron
   :: AUTO_REBOOT_DELAY     (-r)   = Post-run delay (in seconds) before rebooting. Set to 0 to disable auto-reboot
  -:: SKIP_ANTIVIRUS_SCANS  (-sa)  = Set to yes to skip anti-virus scanners (MBAM, KVRT, Sophos)
  +:: SKIP_ANTIVIRUS_SCANS  (-sa)  = Skip ALL antivirus scans (KVRT, MBAM, SAV). Use per-scanner flags to individually toggle usage
   :: SKIP_DEBLOAT          (-sb)  = Set to yes to skip de-bloat section (OEM bloat removal). Implies -m
   :: SKIP_DEFRAG           (-sd)  = Set to yes to skip defrag regardless whether the system drive is an SSD or not. When set to "no" the script will auto-detect SSDs and skip defrag if one is detected
   :: SKIP_EVENT_LOG_CLEAR  (-se)  = Set to yes to skip Event Log clearing
  +:: SKIP_FILEPERMS_RESET  (-sfr) = Set to yes to skip filesystem permissions reset in the Windows system directory. Can save a lot of time if you're in a hurry
  +:: SKIP_KASKPERSKY_SCAN  (-sk)  = Set to yes to skip Kaspersky Virus Rescue Tool scan
  +:: SKIP_MBAM_INSTALL     (-sm)  = Set to yes to skip Malwarebytes Anti-Malware installation
   :: SKIP_PATCHES          (-sp)  = Set to yes to skip patches (do not patch 7-Zip, Java Runtime, Adobe Flash Player and Adobe Reader)
  -:: SKIP_FILEPERMS_RESET  (-sfr) = Set to yes to skip filesystem permissions reset in the Windows system directory. Can save a lot of time if you're in a hurry
   :: SKIP_PAGEFILE_RESET   (-spr) = Skip page file settings reset (don't set to "Let Windows manage the page file")
   :: SKIP_REGPERMS_RESET   (-srr) = Set to yes to skip registry permissions reset. Can save a lot of time if you're in a hurry
  +:: SKIP_SOPHOS_SCAN      (-ss)  = Set to yes to skip Sophos Anti-Virus scan
   :: SKIP_WINDOWS_UPDATES  (-sw)  = Set to yes to skip Windows Updates
   :: VERBOSE               (-v)   = When possible, show as much output as possible from each program Tron calls (e.g. Sophos, KVRT, etc). NOTE: This is often much slower
   :: SELF_DESTRUCT         (-x)   = Set to yes to have Tron automatically delete itself after running. Leaves logs intact
  
positive.code: 	echo    -o   Power off after running ^(overrides -r^)
  	echo    -p   Preserve power settings ^(don't reset to Windows default^)
  	echo    -r   Reboot automatically ^(auto-reboot 15 seconds after completion^)
  	echo    -sa  Skip anti-virus scans ^(MBAM, KVRT, Sophos^)
  	echo    -sb  Skip de-bloat ^(OEM bloatware removal; implies -m^)
  	echo    -sd  Skip defrag ^(force Tron to ALWAYS skip Stage 5 defrag^)
  	echo    -se  Skip Event Log clearing
  	echo    -sp  Skip patches ^(do not patch 7-Zip, Java Runtime, Adobe Flash or Reader^)
  	echo    -sfr Skip filesystem permissions reset ^(saves time if you're in a hurry^)
  	echo    -spr Skip page file settings reset ^(don't set to "Let Windows manage the page file"^)
  	echo    -srr Skip registry permissions reset ^(saves time if you're in a hurry^)
  	echo    -sw  Skip Windows Updates ^(do not attempt to run Windows Update^)
  	echo    -v   Verbose. Show as much output as possible. NOTE: Significantly slower!
  	echo    -x   Self-destruct. Tron deletes itself after running and leaves logs intact
  
negative.code: 
  :: JOB: MBAM (MalwareBytes Anti-Malware)
  title TRON v%SCRIPT_VERSION% [stage_3_disinfect] [Malwarebytes Anti-Malware]
  if exist "%ProgramFiles(x86)%\Malwarebytes Anti-Malware\mbam.exe" (
  	call :log "%CUR_DATE% %TIME% ! Malwarebytes installation detected. Skipping MBAM installation."
  	goto skip_mbam
  )
  if /i %SKIP_MBAM_INSTALL%==yes (
  	call :log "%CUR_DATE% %TIME% ! SKIP_MBAM_INSTALL (-sm) set. Skipping MBAM installation."
  ) else (
  	call :log "%CUR_DATE% %TIME%    Launch job 'Install Malwarebytes Anti-Malware'..."
  	:: Install MBAM & remove the desktop icon
  	if /i %DRY_RUN%==no (
  		"stage_3_disinfect\mbam\Malwarebytes Anti-Malware v2.1.8.1057.exe" /verysilent
  		::"Malwarebytes Anti-Malware v1.75.0.1300.exe" /SP- /VERYSILENT /NORESTART /SUPPRESSMSGBOXES /NOCANCEL
  		if exist "%PUBLIC%\Desktop\Malwarebytes Anti-Malware.lnk" del "%PUBLIC%\Desktop\Malwarebytes Anti-Malware.lnk"
  		if exist "%USERPROFILE%\Desktop\Malwarebytes Anti-Malware.lnk" del "%USERPROFILE%\Desktop\Malwarebytes Anti-Malware.lnk"
  		if exist "%ALLUSERSPROFILE%\Desktop\Malwarebytes Anti-Malware.lnk" del "%ALLUSERSPROFILE%\Desktop\Malwarebytes Anti-Malware.lnk"
  
  		:: Scan for and launch appropriate architecture version
  		if exist "%ProgramFiles(x86)%\Malwarebytes Anti-Malware" (
  			start "" "%ProgramFiles(x86)%\Malwarebytes Anti-Malware\mbam.exe"
  		) else (
  			start "" "%ProgramFiles%\Malwarebytes Anti-Malware\mbam.exe"
  			)
  	)
  	call :log "%CUR_DATE% %TIME%    Done."
  	call :log "%CUR_DATE% %TIME% !  NOTE: You must manually click SCAN in the MBAM window!"
  )
  :skip_mbam
  
  
  :: JOB: Kaspersky Virus Removal Tool (KVRT)
  title TRON v%SCRIPT_VERSION% [stage_3_disinfect] [Kaspersky VRT]
  if /i %SKIP_KASPERSKY_SCAN%==yes (
  	call :log "%CUR_DATE% %TIME% ! SKIP_KASPERSKY_SCAN (-sk) set. Skipping KVRT scan."
  ) else (
  	call :log "%CUR_DATE% %TIME%    Launch job 'Kaspersky Virus Removal Tool'..."
  	call :log "%CUR_DATE% %TIME%    Tool-specific log saved to "%RAW_LOGS%\Reports""
  	if /i %DRY_RUN%==no (
  		start /wait stage_3_disinfect\kaspersky_virus_removal_tool\KVRT.exe -d "%RAW_LOGS%" -accepteula -adinsilent -silent -processlevel 2 -dontcryptsupportinfo
  		if exist "%RAW_LOGS%\Legal notices" rmdir /s /q "%RAW_LOGS%\Legal notices"
  		)
  	call :log "%CUR_DATE% %TIME%    Done."
  )
  
  
  :: JOB: Sophos Virus Remover
  title TRON v%SCRIPT_VERSION% [stage_3_disinfect] [Sophos Virus Remover]
  if /i %SKIP_SOPHOS_SCAN%==yes (
  	call :log "%CUR_DATE% %TIME% ! SKIP_SOPHOS_SCAN (-ss) set. Skipping SAV scan."
  ) else (
  	call :log "%CUR_DATE% %TIME%    Launch job 'Sophos Virus Removal Tool' (slow, be patient)..."
  	call :log "%CUR_DATE% %TIME%    Scanning. Output REDUCED by default (use -v to show)..."
  	if /i %DRY_RUN%==no (
  		echo.
  		if exist "%ProgramData%\Sophos\Sophos Virus Removal Tool\Logs\SophosVirusRemovalTool.log" del /f /q "%ProgramData%\Sophos\Sophos Virus Removal Tool\Logs\SophosVirusRemovalTool.log" >nul 2>&1
  		if /i %VERBOSE%==no	stage_3_disinfect\sophos_virus_remover\svrtcli.exe -yes
  		if /i %VERBOSE%==yes stage_3_disinfect\sophos_virus_remover\svrtcli.exe -yes -debug
  		type "%ProgramData%\Sophos\Sophos Virus Removal Tool\Logs\SophosVirusRemovalTool.log" >> "%LOGPATH%\%LOGFILE%"
  		if exist "%ProgramData%\Sophos\Sophos Virus Removal Tool\Logs\SophosVirusRemovalTool.log" del /f /q "%ProgramData%\Sophos\Sophos Virus Removal Tool\Logs\SophosVirusRemovalTool.log" >nul 2>&1
  		)
  	call :log "%CUR_DATE% %TIME%    Done."
  )
  
  :: AV scans finished
  call :log "%CUR_DATE% %TIME%    Done."
  