anchor.diff:  endlocal
   REM Return from call
   exit /b
  +
  +:getWindowsDrive
  +setlocal
  +systeminfo 2>&1 | find "Windows Directory" > %tmp_file%
  +for /f "tokens=3 delims= " %%i in ( 'type %tmp_file% ') do set tmp=%%i
  +for /f "tokens=1 delims=:" %%i in ( 'echo %tmp%' ) do set result=%%i
  +del %tmp_file%
  +endlocal & set "windrive=%result%"
  +exit /b
  +
  +:checkWkhtmlXP
  +setlocal
  +for /f "delims= skip=2" %%i in ( 'reg query HKEY_LOCAL_MACHINE\SOFTWARE\wkhtmltopdf /v PdfPath' ) do set "result=%%i"
  +set "result=%result:~19%"
  +endlocal & set "wkhtml=%result%"
  +exit /b
  +
  +:checkWkhtmlNotXP
  +setlocal
  +for /f "delims=" %%i in ( 'where /R %1%:\ wkhtmltopdf.exe' ) do set "result=%%i"
  +endlocal & set "wkhtml=%result%"
  +exit /b
  +
  +:checkWgetXP
  +setlocal
  +for /f "delims= skip=2" %%i in ( 'reg query HKEY_LOCAL_MACHINE\SOFTWARE\GnuWin32\Wget\1.11.4-1\setup /v InstallPath' ) do set "wget=%%i"
  +set "result=%result:~23%\bin\wget"
  +endlocal & set "wget=%result%"
  +exit /b
  +
  +:checkWgetNotXP
  +setlocal
  +for /f "delims=" %%i in ( 'where /R %1%:\ wget.exe' ) do set "result=%%i"
  +endlocal & set "wget=%result%"
  +exit /b
  
positive.code: REM Return from call
  exit /b
  
  
  :sleep
  setlocal
  REM fake 1 sec delay
  
negative.code: REM so a non-existent command will result in a non-zero
  REM errorlevel
  
  systeminfo > nul 2>&1
  if %errorlevel% equ 0 goto :notXP
  
  call :checkWkhtmlXP
  call :checkWgetXP
  goto :installChecks
  
  :notXP
  
  call :getWindowsDrive
  call :checkWkhtmlNotXP %windrive%
  call :checkWgetNotXP %windrive%
  
  :installChecks
  
  if "-%wkhtml%-" == -- (
  	echo Please download and install "%wkhtml%" >> %output_log_file%
  