anchor.diff:  if /i %DRY_RUN%==no reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce" /f /v "tron_resume" /t REG_SZ /d "%~dp0tron.bat %-resume" >nul 2>&1
   
   
  -:: Check if autorun (-a) flag was used but we're NOT in Safe Mode. If true, reboot.
  +:: Check if AUTORUN_IN_SAFE_MODE flag was used in conjunction with AUTORUN. If true, reboot.
   if /i %AUTORUN%==yes (
  -	if /i not "%SAFE_MODE%"=="yes" (
  -		call functions\log.bat " ! Autorun flag used, but we're not in Safe Mode. Rebooting in 15 seconds."
  -		if /i %DRY_RUN%==no (
  -			bcdedit /set {default} safeboot network
  -			shutdown -r -f -t 15
  -			pause
  -			exit
  +	if /i %AUTORUN_IN_SAFE_MODE%==yes (
  +		if /i not "%SAFE_MODE%"=="yes" (
  +			call functions\log.bat " ! AUTORUN_IN_SAFE_MODE (-asm) used, but we're not in Safe Mode. Rebooting in 15 seconds."
  +			if /i %DRY_RUN%==no (
  +				bcdedit /set {default} safeboot network
  +				shutdown -r -f -t 15
  +				pause
  +				exit
  +			)
   		)
   	)
   )
  
positive.code: :: Requirements:  1. Administrator access
  ::                2. Safe mode is recommended (though not required)
  :: Author:        vocatus on reddit.com/r/TronScript ( vocatus.gate at gmail ) // PGP key: 0x07d1490f82a211a2
  :: Version:       1.0.4 ! Fix bug in debug log upload code
  ::                1.0.3 / Debug Log Upload: Replace PendingFileRename attachment with the system desktop screenshot instead, since this is often more helpful in troubleshooting
  ::                        BE AWARE A SCREENSHOT OF THE DESKTOP CAN CONTAIN PERSONAL INFORMATION, PLEASE ONLY USE THE -UDL SWITCH IF YOU'RE AWARE OF THIS!
  ::                1.0.2 * Preface WMIC calls with null input to ensure the pipe is closed, fixes issue with WMI hanging on WinXP machines. Thanks to github:salsifis
  ::                        Relevant pull: https://github.com/bmrf/tron/pull/108
  ::                1.0.1 * Update date/time logging functions to use new log_with_date.bat. No functionality change but should help with code readability. Thanks to /u/DudeManFoo
  
negative.code: call functions\initialize_environment.bat
  title Tron v%TRON_VERSION% (%TRON_DATE%)
  
  :: Show help if requested
  for %%i in (%*) do ( if /i %%i==-h ( call :display_help && exit /b 0) )
  
  :: Do the pre-run checks and tasks (Admin rights check, temp directory check, SSD check etc)
  call functions\prerun_checks_and_tasks.bat
  
  :: Parse command-line arguments. If used these will override related settings specified in tron_settings.bat.
  call :parse_cmdline_args %*
  
  :: INTERNAL PREP: Check if we're resuming from a failed or incomplete previous run (often caused by forced reboots in stage_2_de-bloat)
  :: Populate what stage we were on as well as what CLI flags were used. This could probably be a single IF block but I got lazy
  