anchor.diff:  :: 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.6 * Update script to support standalone execution
  +:: 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 * Update script to support standalone execution
   ::                      + Add support for bundled WSUS Offline updates. Thanks to /u/TootZoot for initial template code
   ::                      / change :skip_updates and associated GOTO statements to :skip_application_updates
   ::                      / change various text and strings referring to SKIP_UPDATES to SKIP_APP_UPDATES
  
positive.code: :: JOB: Windows updates
  if /i %SKIP_WINDOWS_UPDATES%==no (
  	title Tron v%TRON_VERSION% [stage_5_patch] [Windows Updates]
  	call functions\log.bat "%CUR_DATE% %TIME%    Launch job 'Install Windows updates'..."
  
  	:: Detect if bundled WSUS Offline updates are included. If so, execute those instead
  	if exist stage_5_patch\wsus_offline\client\Update.cmd (
  		if /i %SKIP_WSUS_OFFLINE%==no (
  			title Tron v%TRON_VERSION% [stage_5_patch] [WSUS Offline Updates]
  			call functions\log.bat "%CUR_DATE% %TIME% !  WSUS Offline updates detected. Using bundled update package..."
  			if /i %DRY_RUN%==no call "%WSUS_OFFLINE_CMD%" >> "%LOGPATH%\%LOGFILE%" 2>&1
  		) else (
  			call functions\log.bat "%CUR_DATE% %TIME% !  WSUS Offline updates detected, but SKIP_WSUS_OFFLINE (-swo) set."
  			call functions\log.bat "%CUR_DATE% %TIME%    Using regular online update method..."
  			if /i %DRY_RUN%==no (
  				sc config wuauserv start= demand>> "%LOGPATH%\%LOGFILE%" 2>NUL
  				net start wuauserv >> "%LOGPATH%\%LOGFILE%" 2>NUL
  
negative.code: 		)
  	)
  ) else (
  	call functions\log.bat " !  SKIP_DISM_CLEANUP (-sdc) set. Skipping DISM cleanup."
  )
  
  call functions\log.bat "    Done."
  
  
  
  
  :: Stage complete
  call functions\log.bat "   stage_5_patch complete."
  