anchor.diff:  set "VSN[2008]=9"   & set "VSA[9]=9/2008"     & set "VSP[9]=Microsoft Visual Studio 9.0"		
   set "VSN[2005]=8"   & set "VSA[8]=8/2005"     & set "VSP[8]=Microsoft Visual Studio 8"		
   set "VSN[2003]=7.1" & set "VSA[7.1]=7.1/2003" & set "VSP[7.1]=Microsoft Visual Studio .NET 2003"	
  -set "VSN[.NET]=7"   & set "VSA[7]=7/.NET"     & set "VSP[7]=Microsoft Visual Studio .NET"		
  -set "VSN[Studio]=6" & set "VSA[6]=6/"         & set "VSP[6]=Microsoft Visual Studio"			
  +set "VSN[2002]=7"   & set "VSA[7]=7/.NET"     & set "VSP[7]=Microsoft Visual Studio .NET"	  & set "VSN[.NET]=7"		
  +set "VSN[98]=6"     & set "VSA[6]=6/98"       & set "VSP[6]=Microsoft Visual Studio"			
  +set "VSN[97]=5"     & set "VSA[5]=5/97"       & set "VSP[5]=Microsoft Visual Studio"			
   
   :# Space-separated list of VC subdirectories to search
   set "VC15S=Enterprise\VC Professional\VC Community\VC Preview\VC"
  
positive.code: set "PROC[IA64]=ia64"	&:# SysToolsLib and VC 8 name
  
  :# List of Visual Studio aliases and paths
  set "VSN[2019]=16"  & set "VSA[16]=16/2019"   & set "VSP[16]=Microsoft Visual Studio\2019"		
  set "VSN[2017]=15"  & set "VSA[15]=15/2017"   & set "VSP[15]=Microsoft Visual Studio\2017"		
  set "VSN[2015]=14"  & set "VSA[14]=14/2015"   & set "VSP[14]=Microsoft Visual Studio 14.0"		
  
negative.code: :# set "BINSELF=!%~5[x86]!"
  :# %ECHOVARS.D% \* BINDIRS
  :# Scan the Program Files tree, looking for cl.exe instances
  %ECHO.D% :# Searching VS in "%~3"
  if exist "%~3" for %%c in (%~4) do (    :# VC subdirectories
    %ECHO.D% :# Searching VC in "%~3\%%~c"
    if exist "%~3\%%~c" (
      set "VCDIRS="
      :# Infos from https://github.com/Microsoft/vswhere/wiki/Find-VC
      if exist "%~3\%%~c\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt" (
        %ECHO.D% :# Reading version in "%~3\%%~c\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"
        set /p VCVER=<"%~3\%%~c\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"
        set "VCDIRS=%~3\%%~c\Tools\MSVC\!VCVER: =!"
      )
      if not defined VCDIRS if exist "%~3\%%~c\Auxiliary\Build\Microsoft.VCRedistVersion.default.txt" (
        :# Preview versions have a Microsoft.VCToolsVersion.v142.default.txt, that's not detected above.
        :# Try using the Microsoft.VCRedistVersion.default.txt, which seems to contain the same version.
        %ECHO.D% :# Reading version in "%~3\%%~c\Auxiliary\Build\Microsoft.VCRedistVersion.default.txt"
        set /p VCVER=<"%~3\%%~c\Auxiliary\Build\Microsoft.VCRedistVersion.default.txt"
        set "VCDIRS=%~3\%%~c\Tools\MSVC\!VCVER: =!"
        if not exist "!VCDIRS!\%BINDIRS%\cl.exe" set "VCDIRS="
        set "VCVER="
      )
      if not defined VCDIRS if exist "%~3\%%~c\Common7\Tools\vsdevcmd.bat" (
        setlocal
        %ECHO.D% :# Locating VC using "%~3\%%~c\Common7\Tools\vsdevcmd.bat"
        set "VCToolsInstallDir="
        call "%~3\%%~c\Common7\Tools\vsdevcmd.bat" >NUL 2>&1
        for %%z in ("!VCToolsInstallDir!") do endlocal & set "VCDIRS=%%~z"
        if defined VCDIRS set "VCDIRS=!VCDIRS:~0,-1!"
        set "VCVER="
      )
      if not defined VCDIRS set "VCDIRS=%~3\%%~c%\*%"
      for /d %%s in ("!VCDIRS!") do (
        %ECHO.D% :# Searching BIN in "%%~s"
        for %%b in (%BINDIRS%) do (
  	%ECHO.D% :# Searching CL in "%%~s\%%b"
  	if exist "%%~s\%%b\cl.exe" (
  	  for %%z in ("%~3\%%~c") do set "%VS%=%%~dpz" &rem :# Remove the VC* subdir name
  	  set "%VS%=!%VS%:~0,-1!" &:# Remove the trailing '\'.
  	  set "%VC%=%%~s" &:# Do not set to "%~3\%%~c", which is wrong for VS15+
  	  set "%VC%.BIN=%%~s\%%b"
  	  set "%VC%.BIN2=%%~s\!BINSELF!"
  	  set "%VC%.CC="%%~s\%%b\cl.exe""
  	  %ECHOVARS.D% %VS% %VC% %VC%.BIN %VC%.CC
  	  set "VCDIRS="
  	  exit /b 0
  	)
        )
      )
  