anchor.diff:  	net start w32time >> "%LOGPATH%\%LOGFILE%" 2>&1
   	w32tm /resync /nowait >> "%LOGPATH%\%LOGFILE%" 2>&1
   )
  -call functions\log.bat "%CUR_DATE% %TIME%    Done."
  +call functions\log.bat "    Done."
   
   
   :: JOB: Check WMI and repair if necessary
   title Tron v%TRON_VERSION% [stage_0_prep] [Check+Fix WMI]
  -call functions\log.bat "%CUR_DATE% %TIME%    Launch job 'Check WMI health'..."
  +call functions\log.bat "    Launch job 'Check WMI health'..."
   SETLOCAL ENABLEDELAYEDEXPANSION
   if /i %DRY_RUN%==no (
   	%WMIC% timezone >NUL
   	if /i not !ERRORLEVEL!==0 (
  -		call functions\log.bat "%CUR_DATE% %TIME% !  WMI appears to be broken. Calling WMI repair sub-script."
  +		call functions\log.bat " !  WMI appears to be broken. Calling WMI repair sub-script."
   		call functions\log.bat "               This will take time, please be patient..."
   		call stage_0_prep\repair_wmi\repair_wmi.bat
   	)
   )
   ENDLOCAL DISABLEDELAYEDEXPANSION
  -call functions\log.bat "%CUR_DATE% %TIME%    Done."
  +call functions\log.bat "    Done."
   
   
   :: JOB: Backup registry
   title Tron v%TRON_VERSION% [stage_0_prep] [Registry Backup]
  -call functions\log.bat "%CUR_DATE% %TIME%    Launch job 'Back up registry' to "%LOGPATH%"..."
  +call functions\log.bat "    Launch job 'Back up registry' to "%LOGPATH%"..."
   if /i %DRY_RUN%==no (
   	start "" stage_0_prep\backup_registry\erunt.exe "%LOGPATH%\registry_backup" /noconfirmdelete /noprogresswindow
   	ping 127.0.0.1 -n 15 >nul
   )
  -call functions\log.bat "%CUR_DATE% %TIME%    Done."
  +call functions\log.bat "    Done."
   
   
   :: JOB: McAfee Stinger
  
positive.code: :: 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.bat "%CUR_DATE% %TIME%    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.bat "%CUR_DATE% %TIME%    Done."
  )
  
  
  :: JOB: Reduce SysRestore space
  title Tron v%TRON_VERSION% [stage_0_prep] [System Restore Modifications]
  call functions\log.bat "%CUR_DATE% %TIME%    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.bat "%CUR_DATE% %TIME%    Done."
  
  
  
  
  :: Stage complete
  call functions\log.bat "%CUR_DATE% %TIME%   stage_0_prep complete."
  
negative.code: :: Requirements:  1. Administrator access
  ::                2. Safe mode is recommended but not required
  :: Author:        vocatus on reddit.com/r/TronScript ( vocatus.gate at gmail ) // PGP key: 0x07d1490f82a211a2
  :: Version:       1.1.7 * Update date/time logging functions to use new log_with_date.bat. Thanks to /u/DudeManFoo for suggestion
  ::                1.1.6 * script: Update script to support standalone execution
  ::                      ! erunt:  Don't wait for ERUNT to finish; launch it, wait 15 seconds, then continue. This is to prevent getting stalled on a rare error which causes a popup msg on Win10
  ::                1.1.5 * Update NTP server commands with ,0x8 suffix to send standard client requests vs. symmetric active requests. Thanks to /u/webtroter
  ::                1.1.4 ! Don't attempt to create System Restore point on Windows 10 systems if in Safe Mode. Why? Because Win10 blocks system restore point creation in Safe Mode. Why? Because Microsoft
  