anchor.diff:  :# goto :MasterPath.Set
   
   :MasterPath.Set
  -set "SETX="
  +set "MORE_THAN_1KB=!MPATH:~1024!" &:# Defined if the new PATH is larger than 1 KB
  +:# Gotcha: reg.exe and setx.exe interpret a trailing \" as escaping the "
  +if "!MPATH:~-1!"=="\" set "MPATH=!MPATH!\"
  +set "CMD="
   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.
  +if not defined MORE_THAN_1KB ( :# If the PATH is less than 1KB long, then try using setx
  +  if defined SETX ( :# If setx.exe is in the PATH, then use it. (Preferred if within the 1KB limit)
  +    :# 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%^"
  +  )
  +)  
  +if not defined CMD ( :# 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.
  +  set ^"CMD=reg add "%MKEY%" /f /v %PATHVAR% /d "%MPATH%"^"
  +  set "NEED_BROADCAST=1"
   )
   if "%NOEXEC%"=="0" (	:# Normal execution mode
     :# Redirect the "SUCCESS: Specified value was saved." message to NUL.
  
positive.code:   if %MODE%==setup (
      %ECHO% :# Adding the Python directory "%PYTHONBIN%" to the %OWNER% PATH
      call :MasterPath.Add1 "%PYTHONBIN%"
    )
  )
  %ECHO% The global %OWNER% PATH !CONTAINS_S! !SCRIPTSDIR!
  
negative.code:     %ECHO% :# Updating the InstallPath registration to: "%PYTHONBIN%\"
      :# Note: The double \\ in the end is necessary for reg.exe, else one \ would escape the "
      %EXEC% reg add "%KEY%" /d "%PYTHONBIN%\\" /f
      set "NEED_BROADCAST=1"
    )
  )
  
  