anchor.diff:  if defined MPATH echo.%MPATH:;=&echo.%
   exit /b
   
  -:MasterPath.Add1 %1=path to add to %PATHVAR%
  +: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
  
positive.code: :#                  Avoid duplications when adding multiple paths.	      #
  :#                  Added support for moving and removing multiple paths.     #
  :#   2019-12-11 JFL Avoid displaying empty lines when PATH ends with a ;      #
  :#                  							      #
  :#          Copyright 2016 Hewlett Packard Enterprise Development LP         #
  :# Licensed under the Apache 2.0 license  www.apache.org/licenses/LICENSE-2.0 #
  :##############################################################################
  
  setlocal EnableExtensions EnableDelayedExpansion
  set "VERSION=2019-12-11"
  set "SCRIPT=%~nx0"
  set "SPATH=%~dp0" & set "SPATH=!SPATH:~0,-1!"
  set "SNAME=%~n0"
  
negative.code:   :# 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.
  )
  