anchor.diff:  cls
   color 0f
   set SCRIPT_VERSION=5.0.0
  -set SCRIPT_DATE=2015-03-xx
  +set SCRIPT_DATE=2015-03-05
   title TRON v%SCRIPT_VERSION% (%SCRIPT_DATE%)
   
   :: Get the date into ISO 8601 standard date format (yyyy-mm-dd) so we can use it 
  
positive.code: 	::	2nd: Subgroup GUID of the "Power buttons and lid" category
  	::	3rd: Specific GUID for the "Lid close action" power setting
  	::	4th: Action code for "Do nothing"
  	powercfg -SETACVALUEINDEX 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 000
  	)
  
  :: This cheats a little bit by stacking the set command on the same line as the endlocal so it executes immediately after ENDLOCAL but before the variable gets wiped out by the endlocal. Kind of a little trick to get a SETLOCAL-internal variable exported to a global script-wide variable.
  
negative.code: :: Big time thanks to reddit.com/user/Suddenly_Engineer and reddit.com/user/Aberu for helping with this
  set SSD_DETECTED=no
  SETLOCAL ENABLEDELAYEDEXPANSION
  for /f "tokens=1" %%i in ('stage_5_optimize\defrag\smartctl.exe --scan') do (
  	stage_5_optimize\defrag\smartctl.exe %%i -a | find /i "Solid State" >NUL
  	if "!ERRORLEVEL!"=="0" ENDLOCAL DISABLEDELAYEDEXPANSION && set SSD_DETECTED=yes&& goto detect_safe_mode
  	)
  for /f "tokens=1" %%i in ('stage_5_optimize\defrag\smartctl.exe --scan') do (
  	stage_5_optimize\defrag\smartctl.exe %%i -a | find /i "SSD" >NUL
  	if "!ERRORLEVEL!"=="0" ENDLOCAL DISABLEDELAYEDEXPANSION && set SSD_DETECTED=yes&& goto detect_safe_mode
  	)
  for /f "tokens=1" %%i in ('stage_5_optimize\defrag\smartctl.exe --scan') do (
  	stage_5_optimize\defrag\smartctl.exe %%i -a | find /i "RAID" >NUL
  	if "!ERRORLEVEL!"=="0" ENDLOCAL DISABLEDELAYEDEXPANSION && set SSD_DETECTED=yes&& goto detect_safe_mode
  	)
  for /f "tokens=1" %%i in ('stage_5_optimize\defrag\smartctl.exe --scan') do (
  	stage_5_optimize\defrag\smartctl.exe %%i -a | find /i "SandForce" >NUL
  	if "!ERRORLEVEL!"=="0" ENDLOCAL DISABLEDELAYEDEXPANSION && set SSD_DETECTED=yes&& goto detect_safe_mode
  	)
  ENDLOCAL DISABLEDELAYEDEXPANSION
  