anchor.diff:  
   :#----------------------------------------------------------------------------#
   :#                                                                            #
  +:#  Function        LocalPath.Add/LocalPath.Remove                            #
  +:#                  MasterPath.Get/MasterPath.Add/MasterPath.Remove           #
  +:#                                                                            #
  +:#  Description     Path management routines			              #
  +:#                                                                            #
  +:#  Note                                                                      #
  +:#                                                                            #
  +:#  History                                                                   #
  +:#   2020-03-12 JFL Copied from paths.bat.                                    #
  +:#                                                                            #
  +:#----------------------------------------------------------------------------#
  +
  +:LocalPath.Echo %1=Optional variable name. Default=PATHVAR
  +setlocal EnableExtensions EnableDelayedExpansion
  +if not "%~1"=="" set "PATHVAR=%~1"
  +if "%VERBOSE%"=="1" echo :# Local cmd.exe %PATHVAR% list items
  +:# Display path list items, one per line
  +set "VALUE=!%PATHVAR%!"
  +echo.%VALUE:;=&echo.%
  +endlocal
  +exit /b
  +
  +:LocalPath.Add1 %1=path to add to %PATHVAR%
  +setlocal EnableExtensions EnableDelayedExpansion
  +%ECHO.D% call %0 %*
  +:# First check if the path to add was already there
  +set "VALUE=!%PATHVAR%:;;=;!"	&:# The initial paths list value
  +set "VALUE2=;!VALUE!;"		&:# Make sure all paths have a ; on both sides
  +set "VALUE2=!VALUE2:;%~1;=;!"	&:# Remove the requested value
  +set "VALUE2=!VALUE2:~1,-1!"	&:# Remove the extra ; we added above
  +:# If the path was not already there, add it now.
  +if "!VALUE2!"=="!VALUE!" (
  +  if "%WHERE%"=="tail" ( :# Append the requested value at the end
  +    if defined VALUE set "VALUE=!VALUE!;"
  +    set "VALUE=!VALUE!%~1"	&:# Append the requested value at the end
  +    set "VALUE=!VALUE:;;=;!"	&:# Work around a common problem: A trailing ';'
  +    rem
  +  ) else (		  :# Insert it before the specified entry
  +    set "VALUE=;!VALUE:;;=;!;"	&:# Make sure all paths have one ; on both sides
  +    set "VALUE=!VALUE:;%BEFORE%;=;%~1;%BEFORE%;!" &:# Insert the requested value
  +    set "VALUE=!VALUE:~1,-1!"	&:# Remove the extra ; we added above
  +    rem
  +  )
  +)
  +endlocal & set "%PATHVAR%=%VALUE%"
  +exit /b
  +
  +:# Change WHERE==head to WHERE=before to preserve multiple paths ordering
  +:UpdateWhere %1=PATHS value
  +if "%WHERE%"=="head" (
  +  if not "%~1"=="" (
  +    for /f "tokens=1 delims=;" %%p in ("%~1") do (
  +      set "BEFORE=%%~p"
  +      set "WHERE=before"
  +    )
  +  ) else ( :# The PATH is empty, so head==tail
  +      set "WHERE=tail"
  +  )
  +)
  +exit /b
  +
  +:LocalPath.Add
  +if not defined VALUE goto :LocalPath.Echo
  +call :UpdateWhere "!%PATHVAR%!" &:# Change WHERE=head to WHERE=before to preserve multiple paths ordering
  +for %%p in ("!VALUE:;=" "!") do ( :# For each individual path to add
  +  call :LocalPath.Add1 "%%~p"
  +)
  +:# goto :LocalPath.Set
  +
  +:LocalPath.Set
  +:# endlocal is necessary for returning the modified value back to the caller
  +set "VALUE=!%PATHVAR%!"
  +endlocal & %EXEC% set "%PATHVAR%=%VALUE%" & if "%NOEXEC%"=="0" if "%QUIET%"=="0" call :LocalPath.Echo %PATHVAR%
  +exit /b
  +
  +:LocalPath.Remove1 %1=path to remove from %PATHVAR%
  +setlocal EnableExtensions EnableDelayedExpansion
  +%ECHO.D% call %0 %*
  +set "VALUE=;!%PATHVAR%:;;=;!;"	&:# Make sure all paths have one ; on both sides
  +set "VALUE=!VALUE:;%~1;=;!"	&:# Remove the requested value
  +set "VALUE=!VALUE:~1,-1!"	&:# Remove the extra ; we added above
  +endlocal & set "%PATHVAR%=%VALUE%"
  +exit /b
  +
  +:LocalPath.Remove
  +if not defined VALUE goto :LocalPath.Echo
  +call :UpdateWhere "!%PATHVAR%!" &:# Change WHERE=head to WHERE=before to preserve multiple paths ordering
  +for %%p in ("!VALUE:;=" "!") do ( :# For each individual path to remove
  +  call :LocalPath.Remove1 "%%~p"
  +)
  +goto :LocalPath.Set
  +
  +:LocalPath.Move
  +if not defined VALUE goto :LocalPath.Echo
  +call :UpdateWhere "!%PATHVAR%!" &:# Change WHERE=head to WHERE=before to preserve multiple paths ordering
  +for %%p in ("!VALUE:;=" "!") do ( :# For each individual path to move
  +  call :LocalPath.Remove1 "%%~p"
  +  call :LocalPath.Add1 "%%~p"
  +)
  +goto :LocalPath.Set
  +
  +:#----------------------------------------------------------------------------#
  +
  +:MasterPath.Get
  +setlocal EnableExtensions DisableDelayedExpansion
  +:# Note: The Path is usuallly in a REG_EXPAND_SZ, but sometimes in a REG_SZ. 
  +set MCMD=reg query "%MKEY%" /v "%PATHVAR%" 2^>NUL ^| findstr REG_
  +%ECHOVAL.D% MCMD
  +for /f "tokens=1,2,*" %%a in ('"%MCMD%"') do set "MPATH=%%c"
  +:MasterPath.Get.TrimR
  +if "%MPATH:~-1%"==";" set "MPATH=%MPATH:~0,-1%" & goto :MasterPath.Get.TrimR
  +endlocal & set "MPATH=%MPATH%" & exit /b
  +
  +:MasterPath.Echo
  +if "%VERBOSE%"=="1" echo :# Global %OWNER% PATH list items
  +call :MasterPath.Get
  +:# Display path list items, one per line
  +if defined MPATH echo.%MPATH:;=&echo.%
  +exit /b
  +
  +:MasterPath.Add1 %1=path to add to MPATH
  +:# First check if the path to add was already there
  +set "MPATH2=;!MPATH!;"		&:# Make sure all paths have a ; on both sides
  +set "MPATH2=!MPATH2:;%~1;=;!"	&:# Remove the requested value
  +set "MPATH2=!MPATH2:~1,-1!"	&:# Remove the extra ; we added above
  +:# If the path was not already there, add it now.
  +if "!MPATH2!"=="!MPATH!" (
  +  if "%WHERE%"=="tail" ( :# Append the requested value at the end
  +    if defined MPATH set "MPATH=!MPATH!;"
  +    set "MPATH=!MPATH!%~1"	&:# Append the requested value at the end
  +    set "MPATH=!MPATH:;;=;!"	&:# Work around a common problem: A trailing ';'
  +    rem
  +  ) else (		  :# Insert it before the specified entry
  +    set "MPATH=;!MPATH!;"	&:# Make sure all paths have a ; on both sides
  +    set "MPATH=!MPATH:;%BEFORE%;=;%~1;%BEFORE%;!" &:# Insert the requested value
  +    set "MPATH=!MPATH:~1,-1!"	&:# Remove the extra ; we added above
  +    rem
  +  )
  +)
  +exit /b
  +
  +:MasterPath.Add
  +if not defined VALUE goto :MasterPath.Echo
  +call :MasterPath.Get
  +call :UpdateWhere "!MPATH!" &:# Change WHERE=head to WHERE=before to preserve multiple paths ordering
  +for %%p in ("!VALUE:;=" "!") do ( :# For each individual path to add
  +  call :MasterPath.Add1 "%%~p"
  +)
  +:# goto :MasterPath.Set
  +
  +:MasterPath.Set
  +set "SETX="
  +for /f %%i in ("setx.exe") do set "SETX=%%~$PATH:i"
  +if defined SETX ( :# If setx.exe is in the PATH, then use it. (Preferred)
  +  :# Gotcha: regex.exe does interpret a trailing \" as escaping the "
  +  if "!MPATH:~-1!"=="\" set "MPATH=!MPATH!\"
  +  :# setx.exe updates the %PATHVAR%, and _does_ broadcast a WM_SETTINGCHANGE to all apps
  +:# Note: The XP version of setx.exe requires the option -m or -M, but fails with /M. The Win7 version supports all.
  +  set CMD=setx %PATHVAR% "!MPATH!" %SETXOPT%
  +) else ( :# Fallback to updating the registry value manually using reg.exe.
  +  :# reg.exe updates the %PATHVAR%, but does _not_ broadcast a WM_SETTINGCHANGE to all apps
  +  :# Note: On XP, /f does not work if it is the last option.
  +  set CMD=reg add "%MKEY%" /f /v %PATHVAR% /d "%MPATH%"
  +  echo Warning: setx.exe is not available on this system.
  +  echo The %OWNER%'s default PATH update will only be visible after a reboot.
  +  echo Note: setx.exe is standard in Windows Vista and later versions.
  +  echo       A version for Windows XP is available in the XP Resource Kit.
  +)
  +if "%NOEXEC%"=="0" (	:# Normal execution mode
  +  :# Redirect the "SUCCESS: Specified value was saved." message to NUL.
  +  :# Errors, if any, will still be output on stderr.
  +  if "%VERBOSE%"=="1" echo :# %CMD%
  +  %CMD% >NUL
  +) else (		:# NoExec mode. Just echo the command to execute.
  +  echo %CMD%
  +)
  +if "%NOEXEC%"=="0" if "%QUIET%"=="0" goto :MasterPath.Echo
  +exit /b
  +
  +:MasterPath.Remove1 %1=path to remove from MPATH
  +set "MPATH=;!MPATH:;;=;!;"	&:# Make sure all paths have one ; on both sides
  +set "MPATH=!MPATH:;%~1;=;!"	&:# Remove the requested value
  +set "MPATH=!MPATH:~1,-1!"	&:# Remove the extra ; we added above
  +exit /b
  +
  +:MasterPath.Remove
  +if not defined VALUE goto :MasterPath.Echo
  +call :MasterPath.Get
  +call :UpdateWhere "!MPATH!" &:# Change WHERE=head to WHERE=before to preserve multiple paths ordering
  +for %%p in ("!VALUE:;=" "!") do ( :# For each individual path to remove
  +  call :MasterPath.Remove1 "%%~p"
  +)
  +goto :MasterPath.Set
  +
  +:MasterPath.Move
  +if not defined VALUE goto :MasterPath.Echo
  +call :MasterPath.Get
  +call :UpdateWhere "!MPATH!" &:# Change WHERE=head to WHERE=before to preserve multiple paths ordering
  +for %%p in ("!VALUE:;=" "!") do ( :# For each individual path to move
  +  call :MasterPath.Remove1 "%%~p"
  +  call :MasterPath.Add1 "%%~p"
  +)
  +goto :MasterPath.Set
  +
  +:#----------------------------------------------------------------------------#
  +:#                                                                            #
   :#  Function        FindPython                                                #
   :#                                                                            #
   :#  Description     Find the latest python.exe in %SEARCHDRIVES%              #
  
positive.code: for %%t in (tee.exe) do set "Exec.tee=%%~$PATH:t"
  :# Initialize ERRORLEVEL with known values
  set "TRUE.EXE=(call,)"	&:# Macro to silently set ERRORLEVEL to 0
  set "FALSE.EXE=(call)"	&:# Macro to silently set ERRORLEVEL to 1
  goto :NoExec.%NOEXEC%
  
  :Exec.On
  
negative.code:   setlocal EnableDelayedExpansion
    for /f "delims=" %%a in ("!ARGS:%%=%%%%!") do endlocal & set ^"PopArg.ARGS=%%a^"
  )
  :# Note: The following call doubles ^ within "quotes", but not those outside of quotes.
  :# So :PopArg.Helper will correctly record ^ within quotes, but miss those outside. (Unless quadrupled!)
  :# The only way to fix this would be to completely rewrite :PopArg as a full fledged batch parser written in batch!
  call :PopArg.Helper %PopArg.ARGS% >NUL 2>NUL &:# Output redirections ensure the call help is not actually output.
  :# Finding that impossible combination now is proof that the call was not executed.
  :# In this case, try again with the /? quoted, to prevent the call parser from processing it.
  