anchor.diff:  echo PERL_PATH=%PERL_PATH%
   :got_perl
   
  -if "~%_NMI_PREREQ_7_Zip_ROOT%"=="~" (
  -  set ZIP_PATH=%ProgramFiles%\7-Zip
  +:: figure out the path to 7-Zip
  +::
  +for %%I in (7z.exe) do set ZIP_PATH=%%~sdp$PATH:I
  +echo path ZIP_PATH=%ZIP_PATH%
  +if NOT "~%_NMI_PREREQ_7_Zip_ROOT%"=="~" (
  +   set ZIP_PATH=%_NMI_PREREQ_7_Zip_ROOT%
   ) else (
  -  set ZIP_PATH=%_NMI_PREREQ_7_Zip_ROOT%
  +   if "~%ZIP_PATH%"=="~" (
  +      set ZIP_PATH=%ProgramFiles%\7-Zip
  +      echo guess ZIP_PATH=%ZIP_PATH%
  +   )
   )
  +:: strip trailing \ from zip dir
  +if "~%ZIP_PATH:~-1%"=="~\" set ZIP_PATH=%ZIP_PATH:~0,-1%
  +
  +:: figure out where the cmake bin directory is.
  +::
  +for %%I in (cmake.exe) do set CMAKE_BIN_DIR=%%~sdp$PATH:I
  +echo path CMAKE_BIN_DIR=%CMAKE_BIN_DIR%
  +if NOT "~%_NMI_PREREQ_cmake_ROOT%"=="~" (
  +   set CMAKE_BIN_DIR=%_NMI_PREREQ_cmake_ROOT%\bin
  +   echo nmi CMAKE_BIN_DIR=%CMAKE_BIN_DIR%
  +) else (
  +   if "~%CMAKE_BIN_DIR%"=="~" (
  +      set CMAKE_BIN_DIR=C:\Program Files\CMake 2.8\bin
  +      echo guess CMAKE_BIN_DIR=%CMAKE_BIN_DIR%
  +   )
  +)
  +:: strip trailing \ from cmake bin dir
  +if "~%CMAKE_BIN_DIR:~-1%"=="~\" set CMAKE_BIN_DIR=%CMAKE_BIN_DIR:~0,-1%
  +
   set WIX_PATH=%WIX%
   set MSCONFIG_TOOLS_DIR=%BUILD_ROOT%\msconfig
  -if "~%_NMI_PREREQ_cmake_ROOT%"=="~" (
  -   set CMAKE_BIN_DIR=%ProgramFiles%\CMake 2.8\bin
  -) else (
  -   set CMAKE_BIN_DIR=%_NMI_PREREQ_cmake_ROOT%\bin
  -)
   
   set PATH=%SystemRoot%\system32;%SystemRoot%;%PERL_PATH%;%MSCONFIG_TOOLS_DIR%;%VS_DIR%\Common7\IDE;%VC_BIN%;%CMAKE_BIN_DIR%;%ZIP_PATH%;%WIX_PATH%
   @echo PATH=%PATH%
  
positive.code: 
  set DOTNET_PATH=%SystemRoot%\Microsoft.NET\Framework\v3.5;%SystemRoot%\Microsoft.NET\Framework\v2.0.50727
  
  set PERL_PATH=
  :: Is active perl passed as prereqs?
  set ACTIVE_PERL_DIR=%_NMI_PREREQ_ActivePerl_ROOT%
  
negative.code: set TEMP=%BUILD_ROOT%\Temp
  set TMP=%BUILD_ROOT%\Temp
  
  :: pick up compiler path from VS90COMNTOOLS environment variable
  ::
  for /D %%I in ("%VS90COMNTOOLS%..") do set VS90ROOT=%%~sdpI
  set VS_DIR=%VS90ROOT:~0,-1%
  set VC_DIR=%VS_DIR%\VC
  