anchor.diff:  )
   
   echo Patch checker, Conor O'Rourke 2016, Public domain
  -echo Patch lists from: http://wu.krelay.de/en/ with grateful thanks
  -echo.
  -echo This script just checks a defined list of patches and offers
  -echo to download them. Nothing else is done. Once you have the
  -echo list downloaded, stop Windows update (control panel/services)
  -echo and execute each .msu file by double clicking on it.
  -echo If you have more than one, don't reboot!
  -echo.
  -echo Each .msu file should be signed so you can check that in
  -echo properties if you do not trust this script to get it right.
  -echo.
  -echo Once complete, reboot and rerun this script to check that
  -echo all patches actually went in....
  -echo.
  -
  +echo Patch lists from: http://wu.krelay.de/en/ with
  +echo massive help from askwoody.com. Grateful thanks to both
  +echo.
  +echo This script checks to see if you have the July 2016 rollup
  +echo and its dependencies (the service stack updates). If you
  +echo do not, it offers to download them.
  +echo This will speed up the Windows Update search from days to
  +echo minutes.
  +echo If you do have this rollup, the script offers to download
  +echo the latest Security ONLY quality update.
  +echo.
  +echo It is perfectly fine to run this script on a brand new
  +echo installation of Windows 7 SP1. You should then scan for
  +echo updates and you will get about 70 results in the search.
  +echo If you do not want telemetry and other ignorant software
  +echo from Microsoft, DO NOT select Security Monthly rollups:
  +echo.
  +echo     "November, 2016 Security Monthly Quality Rollup..."
  +echo.    ^^^^^^^^^^^ !!!NO NO NO!!! ^^^^^^^^^^^^^^^^^^^^^^^^
  +echo.
  +echo Right click and hide this update! Then install the rest
  +echo and then rerun this script.
  +echo .
  +
  +pause
   
   set winversion=
  -ver | find "6.0." > NUL && set winversion=windows6.0
  -ver | find "6.1." > NUL && set winversion=windows6.1
  -ver | find "6.2." > NUL && set winversion=windows8.0
  -ver | find "6.3." > NUL && set winversion=windows8.1
  +ver | find "6.1." > NUL && set winversion=Windows6.1
  +ver | find "6.3." > NUL && set winversion=Windows8.1
   
   if "X%winversion%"=="X" (
       echo .
  -    echo Error: Windows is not Vista, 7, 8.0 or 8.1
  +    echo Error: Windows is not 7 or 8.1
  +    echo        Sorry, cannot do Vista or Windows 8.0
       pause
       goto :EOF
   )
   
  -if "%winversion%"=="windows6.0" echo Using Windows Vista
  -if "%winversion%"=="windows6.1" echo Using Windows 7
  -if "%winversion%"=="windows8.0" echo Using Windows 8
  -if "%winversion%"=="windows8.1" echo Using Windows 8.1
  +if "%winversion%"=="windows6.1" (
  +    echo Using Windows 7 and following the guide at:
  +    echo    https://support.microsoft.com/en-us/help/22801
  +)
  +
  +if "%winversion%"=="windows8.1" (
  +    echo Using Windows 8.1 and following the guide at:
  +    echo    https://support.microsoft.com/en-gb/help/24717
  +)
   
   set winarch=x86
   %wmicpath% COMPUTERSYSTEM GET SystemType | find /i "x64" > NUL && set winarch=x64
   
   echo Windows architecture is: %winarch%
  -
  -
  +echo .
   echo Searching for patches
   
   set patchlist=
   
  -for /F "usebackq delims=- tokens=6" %%a in (`findstr /I "download/" "%mypathname%" ^| findstr /I "%winversion%" ^| findstr /I "%winarch%"`) do (
  +for /F "usebackq delims=- tokens=6" %%a in (`findstr /R "^./download/" "%mypathname%" ^| findstr /I "%winversion%" ^| findstr /I "%winarch%"`) do (
       set patchlist=!patchlist! %%a
   )
   
  
positive.code: @echo off
  
  setlocal enableextensions enabledelayedexpansion
  
  set msdownloadpath=https://download.microsoft.com/
  set mypathname=%~f0
  
negative.code:     if errorlevel 1 set missinglist=!missinglist! %%a
  )
  
  set haveslist=
  set haverlist=
  set haveulist=
  
  if "X%foundlist%" == "X" goto havenothing
  
  for /F "usebackq" %%a in (`findstr /R "^./download/" "%mypathname%" ^| findstr /I "%winversion%" ^| findstr /I "%winarch%" ^| findstr /I "%foundlist%"`) do (
      echo %%a | findstr /R "^U/download/" > NUL
      if NOT errorlevel 1 set haveulist=%%a
      echo %%a | findstr /R "^R/download/" > NUL
      if NOT errorlevel 1 set haverlist=%%a
      echo %%a | findstr /R "^S/download/" > NUL
      if NOT errorlevel 1 set haveslist=%%a
  )
  
  if NOT "X%haveulist%"=="X" (
      echo You have the current Security only rollup. You're done!
      goto :EOF
  )
  
  if NOT "X%haverlist%"=="X" (
      echo You have the July 2016 rollup. You need the current Security only rollup...
      call :downloadfile U
      goto :EOF
  )
  
  if NOT "X%haveslist%"=="X" (
      echo You have one of the servicing stacks. You need the July 2016 rollup...
      call :downloadfile R
      goto :EOF
  )
  
  :havenothing
  
  echo You do not have anything so far. Start with the servicing stack...
  call :downloadfile S
  goto :EOF
  
  
  :downloadfile
  
  if "X%missinglist%"=="X" (
      echo All patches present! Should not happen!
      goto :EOF
  )
  
  for /F "usebackq" %%a in (`findstr /R "^%1/download/" "%mypathname%" ^| findstr /I "%winversion%" ^| findstr /I "%winarch%" ^| findstr /I "%missinglist%"`) do (
      set pullurl=%%a
  )
  
  if "X%pullurl%"=="X" (
      echo Something went wrong finding that patch
      goto :EOF
  )
  
  set pullurl=%msdownloadpath%%pullurl:~2%
  
  set pullurllocal=
  
  for /F "usebackq" %%a in (`echo %pullurl%`) do (
      set pullurllocal=%%~nxa
  )
  
  if "X%pullurllocal%"=="X" (
      echo Something went wrong separating the name!
      goto :EOF
  )
  
  echo The download url is: %pullurl%
  
  if not exist %bitsadmin% (
      echo Need bitsadmin.exe to download files so skipping this part
      goto :EOF
  )
  
  set /p downloadyn=Would you like me to download those patches for you?
  
  