anchor.diff:  	)
   	del %BACKUPS%\tron_power_config_backup.pow 2>NUL
   ) else (
  -	call :log Resetting Windows power settings to defaults...
  +	call :log "%CUR_DATE% %TIME%    Resetting Windows power settings to defaults..."
   	REM Check for Windows XP/2k3
   	if /i "%WIN_VER:~0,9%"=="Microsoft" (
   		if /i %DRY_RUN%==no %WINDIR%\system32\powercfg.exe /RestoreDefaultPolicies >NUL 2>&1
  
positive.code: pushd %~dp0 2>NUL
  
  
  
  :: PREP: Parse command-line arguments
  for %%i in (%*) do (
  	if /i %%i==-a set AUTORUN=yes
  	if /i %%i==-c set CONFIG_DUMP=yes
  	if /i %%i==-d set DRY_RUN=yes
  	if /i %%i==-e set EULA_ACCEPTED=yes
  	if /i %%i==-er set EMAIL_REPORT=yes
  	if /i %%i==-gsl set GENERATE_SUMMARY_LOGS=yes
  	if /i %%i==-h set HELP=yes
  	if /i %%i==-m set PRESERVE_METRO_APPS=yes
  	if /i %%i==-o set AUTO_SHUTDOWN=yes
  	if /i %%i==-p set PRESERVE_POWER_SCHEME=yes
  	if /i %%i==-r set AUTO_REBOOT_DELAY=15
  	if /i %%i==-sa set SKIP_ANTIVIRUS_SCANS=yes
  	if /i %%i==-sb set SKIP_DEBLOAT=yes
  	if /i %%i==-sd set SKIP_DEFRAG=yes
  	if /i %%i==-se set SKIP_EVENT_LOG_CLEAR=yes
  	if /i %%i==-sp set SKIP_PATCHES=yes
  	if /i %%i==-sw set SKIP_WINDOWS_UPDATES=yes
  	if /i %%i==-v set VERBOSE=yes
  	if /i %%i==-x set SELF_DESTRUCT=yes
  	if %%i==-UPM set UNICORN_POWER_MODE=on
  	)
  
  
  :: PREP: Execute help if requested
  
negative.code: 	"stage_1_tempclean\usb_cleanup\DriveCleanup x86.exe" -n >> "%LOGPATH%\%LOGFILE%" 2>NUL
  	)
  )
  call :log "%CUR_DATE% %TIME%    Done."
  
  
  :: JOB: Clear Windows event logs
  title TRON v%SCRIPT_VERSION% [stage_1_tempclean] [Clear Windows Event Logs]
  call :log "%CUR_DATE% %TIME%    Launch job 'Clear Windows event logs'..."
  if /i %SKIP_EVENT_LOG_CLEAR%==yes (
  	call :log "%CUR_DATE% %TIME% ! SKIP_EVENT_LOG_CLEAR ^(-se^) set. Skipping Event Log clear."
  	goto skip_event_log_clear
  	)
  call :log "%CUR_DATE% %TIME%    Saving logs to "%BACKUPS%" first..."
  :: Backup all logs first. Redirect error output to NUL (2>nul) because due to the way WMI formats lists, there is
  :: a trailing blank line which messes up the last iteration of the FOR loop, but we can safely suppress errors from it
  SETLOCAL ENABLEDELAYEDEXPANSION
  if /i %DRY_RUN%==no for /f %%i in ('%WMIC% nteventlog where "filename like '%%'" list instance') do %WMIC% nteventlog where "filename like '%%%%i%%'" backupeventlog "%BACKUPS%\%%i.evt" >> "%LOGPATH%\%LOGFILE%" 2>NUL
  ENDLOCAL DISABLEDELAYEDEXPANSION
  call :log "%CUR_DATE% %TIME%    Backups done, now clearing..."
  :: Clear the logs
  if /i %DRY_RUN%==no %WMIC% nteventlog where "filename like '%%'" cleareventlog >> "%LOGPATH%\%LOGFILE%"
  :: Alternate Vista-and-up only method
  :: if /i %DRY_RUN%==no for /f %%x in ('wevtutil el') do wevtutil cl "%%x" 2>NUL
  
  call :log "%CUR_DATE% %TIME%    Done."
  :skip_event_log_clear
  
  
  
  :: JOB: Clear Windows Update cache
  title TRON v%SCRIPT_VERSION% [stage_1_tempclean] [Clear Windows Update cache]
  call :log "%CUR_DATE% %TIME%    Launch job 'Clear Windows Update cache'..."
  if /i %DRY_RUN%==no (
  	:: Allow us to start the service in Safe Mode. Thanks to /u/GrizzlyWinter
  	reg add "HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\%SAFEBOOT_OPTION%\WUAUSERV" /ve /t reg_sz /d Service /f >> "%LOGPATH%\%LOGFILE%" 2>&1
  